sigsuspend.c 583 B

12345678910111213141516171819202122232425
  1. /*
  2. * sigsuspend() 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. #ifdef __USE_POSIX
  10. #include <signal.h>
  11. #include <cancel.h>
  12. int __NC(sigsuspend)(const sigset_t *set)
  13. {
  14. #ifdef __NR_rt_sigsuspend
  15. return INLINE_SYSCALL(rt_sigsuspend, 2, set, __SYSCALL_SIGSET_T_SIZE);
  16. #else
  17. return INLINE_SYSCALL(sigsuspend, 3, 0, 0, set->__val[0]);
  18. #endif
  19. }
  20. CANCELLABLE_SYSCALL(int, sigsuspend, (const sigset_t *set), (set))
  21. lt_libc_hidden(sigsuspend)
  22. #endif