diff options
author | dzwdz | 2023-09-18 16:20:52 +0200 |
---|---|---|
committer | dzwdz | 2023-09-18 16:20:52 +0200 |
commit | 14fd2aecd074fb93bb509df0c1cedd1f1055a4a6 (patch) | |
tree | 10ecb45967748a6b65558074f22c8cdf52ee74ae /src/libc | |
parent | 730a929fffbaaaeb20529962654049fe26dd5dde (diff) |
kernel: implement _sys_time()
After some consideration this seems like the most fitting way to handle
timekeeping. Directly, the syscall is only useful for keeping time within a
single process, but it is meant to be used for e.g. NTP clients, which will
provide the real time through the VFS.
Diffstat (limited to 'src/libc')
-rw-r--r-- | src/libc/syscall.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libc/syscall.c b/src/libc/syscall.c index 706aec6..4cdbe6c 100644 --- a/src/libc/syscall.c +++ b/src/libc/syscall.c @@ -94,6 +94,10 @@ hid_t _sys_getprocfs(int flags) { return (hid_t)_syscall(_SYS_GETPROCFS, (long)flags, 0, 0, 0, 0); } +uint64_t _sys_time(int flags) { + return (uint64_t)_syscall(_SYS_TIME, (long)flags, 0, 0, 0, 0); +} + long _sys_execbuf(void __user *buf, size_t len) { return _syscall(_SYS_EXECBUF, (long)buf, (long)len, 0, 0, 0); } |