Kernel: Add basic nanosleep, only millisecond percision
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
Reference in New Issue
Block a user