sigsuspend.c 719 B

12345678910111213141516171819202122232425262728293031323334
  1. /* vi: set sw=4 ts=4: */
  2. /*
  3. * sigsuspend() 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. #include "syscalls.h"
  10. #include <signal.h>
  11. #undef sigsuspend
  12. #ifdef __NR_rt_sigsuspend
  13. #define __NR___rt_sigsuspend __NR_rt_sigsuspend
  14. _syscall2(int, __rt_sigsuspend, const sigset_t *, mask, size_t, size);
  15. int sigsuspend(const sigset_t * mask)
  16. {
  17. return __rt_sigsuspend(mask, _NSIG / 8);
  18. }
  19. #else
  20. #define __NR___sigsuspend __NR_sigsuspend
  21. _syscall3(int, __sigsuspend, int, a, unsigned long int, b,
  22. unsigned long int, c);
  23. int sigsuspend(const sigset_t * set)
  24. {
  25. return __sigsuspend(0, 0, set->__val[0]);
  26. }
  27. #endif