From 14fd2aecd074fb93bb509df0c1cedd1f1055a4a6 Mon Sep 17 00:00:00 2001 From: dzwdz Date: Mon, 18 Sep 2023 16:20:52 +0200 Subject: 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. --- src/libc/syscall.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/libc') 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); } -- cgit v1.2.3