pause.c 520 B

1234567891011121314151617181920212223242526
  1. /* vi: set sw=4 ts=4: */
  2. /*
  3. * pause() for uClibc
  4. *
  5. * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
  6. *
  7. * GNU Library General Public License (LGPL) version 2 or later.
  8. */
  9. #define __sigpause __sigpause_internal
  10. #define sigblock __sigblock
  11. #include "syscalls.h"
  12. #include <unistd.h>
  13. #ifdef __NR_pause
  14. #define __NR___libc_pause __NR_pause
  15. _syscall0(int, __libc_pause);
  16. #else
  17. #include <signal.h>
  18. int __libc_pause(void)
  19. {
  20. return (__sigpause(sigblock(0), 0));
  21. }
  22. #endif
  23. weak_alias(__libc_pause, pause)