sigsuspend.c 608 B

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