note a leak that needs fixing eventually
[trinity.git] / syscalls / clock_nanosleep.c
blobceec09fd121c9e2c5bdca762410af9ff7b0ae348
1 /*
2 * SYSCALL_DEFINE4(clock_nanosleep, const clockid_t, which_clock, int, flags,
3 const struct timespec __user *, rqtp,
4 struct timespec __user *, rmtp)
6 * On successfully sleeping for the requested interval, clock_nanosleep() returns 0.
7 * If the call is interrupted by a signal handler or encounters an error,
8 * then it returns one of the positive error number listed in ERRORS.
9 */
11 #include <time.h>
12 #include "sanitise.h"
14 struct syscallentry syscall_clock_nanosleep = {
15 .name = "clock_nanosleep",
16 .num_args = 4,
17 .arg1name = "which_clock",
18 .arg1type = ARG_OP,
19 .arg1list = {
20 .num = 3,
21 .values = { CLOCK_REALTIME, CLOCK_MONOTONIC, CLOCK_PROCESS_CPUTIME_ID },
23 .arg2name = "flags",
24 .arg2type = ARG_LIST,
25 .arg2list = {
26 .num = 1,
27 .values = { TIMER_ABSTIME },
29 .arg3name = "rqtp",
30 .arg3type = ARG_ADDRESS,
31 .arg4name = "rmtp",
32 .arg4type = ARG_ADDRESS,
33 .rettype = RET_ZERO_SUCCESS,
34 .flags = NEED_ALARM,