Kernel: Add basic nanosleep, only millisecond percision

This commit is contained in:
Bananymous
2023-09-04 12:58:25 +03:00
parent b2139c0b1e
commit 9901f95d78
5 changed files with 17 additions and 0 deletions

View File

@@ -51,6 +51,7 @@ __BEGIN_DECLS
#define SYS_GET_PGID 44
#define SYS_SET_PGID 45
#define SYS_FCNTL 46
#define SYS_NANOSLEEP 47
__END_DECLS

View File

@@ -5,4 +5,9 @@
int clock_gettime(clockid_t clock_id, struct timespec* tp)
{
return syscall(SYS_CLOCK_GETTIME, clock_id, tp);
}
int nanosleep(const struct timespec* rqtp, struct timespec* rmtp)
{
return syscall(SYS_NANOSLEEP, rqtp, rmtp);
}