summaryrefslogtreecommitdiff
path: root/sys/include
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2025-06-17 02:28:24 -0400
committerIan Moffett <ian@osmora.org>2025-06-17 02:30:05 -0400
commit90b48b3e6c6cf7bfc1fbbb141c84c7e62a6817fe (patch)
tree3933012fb3c12b18c0400545803d6c271a6d5af8 /sys/include
parentbd1f2f56adf87fbaf69135e2bfd650ff472982d9 (diff)
kernel: time: Introduce SYS_sleep
Add SYS_sleep to put a thread to sleep for some time through a timespec Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/include')
-rw-r--r--sys/include/sys/syscall.h1
-rw-r--r--sys/include/sys/time.h6
2 files changed, 7 insertions, 0 deletions
diff --git a/sys/include/sys/syscall.h b/sys/include/sys/syscall.h
index 37e2286..6d9dae6 100644
--- a/sys/include/sys/syscall.h
+++ b/sys/include/sys/syscall.h
@@ -52,6 +52,7 @@
#define SYS_munmap 11
#define SYS_access 12
#define SYS_lseek 13
+#define SYS_sleep 14
#if defined(_KERNEL)
/* Syscall return value and arg type */
diff --git a/sys/include/sys/time.h b/sys/include/sys/time.h
index fb98b9d..8563fc7 100644
--- a/sys/include/sys/time.h
+++ b/sys/include/sys/time.h
@@ -31,6 +31,9 @@
#define _SYS_TIME_H_
#include <sys/types.h>
+#if defined(_KERNEL)
+#include <sys/syscall.h>
+#endif /* _KERNEL */
struct timeval {
time_t tv_sec;
@@ -48,4 +51,7 @@ struct date {
uint8_t hour;
};
+#if defined(_KERNEL)
+scret_t sys_sleep(struct syscall_args *scargs);
+#endif
#endif /* !_SYS_TIME_H_ */