summaryrefslogtreecommitdiffstats
path: root/usr/klibc/clock_nanosleep.c
blob: b4fd1e2c485bb77f7ba7c57a347153d0407f6d63 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include <time.h>
#include <sys/time.h>
#include <sys/syscall.h>

extern int __clock_nanosleep(clockid_t, int,
			     const struct timespec *, struct timespec *);

/*
 * POSIX says this has to return a positive error code, but the system
 * call returns error codes in the usual way.
 */
int clock_nanosleep(clockid_t clock_id, int flags,
		    const struct timespec *request, struct timespec *remain)
{
	return __clock_nanosleep(clock_id, flags, request, remain) ?
		errno : 0;
}