nanosleep.c 527 B

1234567891011121314151617181920
  1. /*
  2. * nanosleep() for uClibc
  3. *
  4. * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
  5. *
  6. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  7. */
  8. #include <sys/syscall.h>
  9. #include <time.h>
  10. #include <cancel.h>
  11. #define __NR___nanosleep_nocancel __NR_nanosleep
  12. static _syscall2(int, __NC(nanosleep), const struct timespec *, req,
  13. struct timespec *, rem);
  14. CANCELLABLE_SYSCALL(int, nanosleep,
  15. (const struct timespec *req, struct timespec *rem),
  16. (req, rem))
  17. lt_libc_hidden(nanosleep)