pause.c 550 B

123456789101112131415161718192021222324252627
  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 "syscalls.h"
  11. #include <unistd.h>
  12. #ifdef __NR_pause
  13. #define __NR___libc_pause __NR_pause
  14. _syscall0(int, __libc_pause);
  15. #else
  16. #include <signal.h>
  17. libc_hidden_proto(__sigpause)
  18. libc_hidden_proto(sigblock)
  19. int __libc_pause(void)
  20. {
  21. return (__sigpause(sigblock(0), 0));
  22. }
  23. #endif
  24. weak_alias(__libc_pause,pause)