1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-30 18:38:12 +00:00

Add gettimeofday() syscall and LibC wrappers gettimeofday() and time().

This only has second accuracy right now, I'll work out subseconds later.
This commit is contained in:
Andreas Kling 2018-10-25 17:29:49 +02:00
parent 5978185242
commit dc6f57f19c
20 changed files with 188 additions and 8 deletions

View file

@ -25,6 +25,7 @@
#include <ELFLoader/ELFLoader.h>
#include "Console.h"
#include "ProcFileSystem.h"
#include "RTC.h"
#define TEST_VFS
//#define STRESS_TEST_SPAWNING
@ -179,6 +180,7 @@ void init()
auto console = make<Console>();
RTC::initialize();
PIC::initialize();
gdt_init();
idt_init();
@ -191,6 +193,7 @@ void init()
PIT::initialize();
memset(&system, 0, sizeof(system));
WORD base_memory = (CMOS::read(0x16) << 8) | CMOS::read(0x15);
WORD ext_memory = (CMOS::read(0x18) << 8) | CMOS::read(0x17);