pause.c 589 B

12345678910111213141516171819202122232425262728
  1. /* vi: set sw=4 ts=4: */
  2. /*
  3. * pause() for uClibc
  4. *
  5. * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
  6. *
  7. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  8. */
  9. #define __UCLIBC_HIDE_DEPRECATED__
  10. #include <sys/syscall.h>
  11. #include <unistd.h>
  12. extern __typeof(pause) __libc_pause;
  13. #ifdef __NR_pause
  14. #define __NR___libc_pause __NR_pause
  15. _syscall0(int, __libc_pause)
  16. #else
  17. #include <signal.h>
  18. libc_hidden_proto(__sigpause)
  19. libc_hidden_proto(sigblock)
  20. int __libc_pause(void)
  21. {
  22. return (__sigpause(sigblock(0), 0));
  23. }
  24. #endif
  25. weak_alias(__libc_pause,pause)