projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
treat null vdso base same as missing
[musl]
/
src
/
time
/
clock_nanosleep.c
diff --git
a/src/time/clock_nanosleep.c
b/src/time/clock_nanosleep.c
index
c777c17
..
9e4d9f1
100644
(file)
--- a/
src/time/clock_nanosleep.c
+++ b/
src/time/clock_nanosleep.c
@@
-1,12
+1,10
@@
#include <time.h>
#include <time.h>
+#include <errno.h>
#include "syscall.h"
#include "libc.h"
int clock_nanosleep(clockid_t clk, int flags, const struct timespec *req, struct timespec *rem)
{
#include "syscall.h"
#include "libc.h"
int clock_nanosleep(clockid_t clk, int flags, const struct timespec *req, struct timespec *rem)
{
- int ret;
- CANCELPT_BEGIN;
- ret = __syscall(__NR_clock_nanosleep, clk, flags, req, rem);
- CANCELPT_END;
- return ret;
+ int r = -__syscall_cp(SYS_clock_nanosleep, clk, flags, req, rem);
+ return clk == CLOCK_THREAD_CPUTIME_ID ? EINVAL : r;
}
}