Introduce time64 support.
[uclibc-ng.git] / libc / sysdeps / linux / common / nanosleep.c
blob2b59fefefea078c349c98de52a2a73695c63ea79
1 /*
2 * nanosleep() for uClibc
4 * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
6 * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
7 */
9 #include <sys/syscall.h>
10 #include <time.h>
11 #include <cancel.h>
14 int _NC(nanosleep)(const struct timespec *req, struct timespec *rem)
16 int __ret = clock_nanosleep(CLOCK_REALTIME, 0, req, rem);
18 if (__ret != 0) {
19 __set_errno(__ret);
20 return -1;
23 return __ret;
26 CANCELLABLE_SYSCALL(int, nanosleep,
27 (const struct timespec *req, struct timespec *rem),
28 (req, rem))
30 lt_libc_hidden(nanosleep)