|
@@ -17,22 +17,16 @@
|
|
|
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
|
|
02111-1307 USA. */
|
|
|
|
|
|
-#define __UCLIBC_HIDE_DEPRECATED__
|
|
|
-
|
|
|
-#include <errno.h>
|
|
|
-#define __FAVOR_BSD
|
|
|
#include <signal.h>
|
|
|
#define __need_NULL
|
|
|
#include <stddef.h>
|
|
|
-#ifdef __UCLIBC_HAS_THREADS_NATIVE__
|
|
|
-#include <sysdep-cancel.h>
|
|
|
-#endif
|
|
|
+#include <cancel.h>
|
|
|
|
|
|
#include "sigset-cvt-mask.h"
|
|
|
|
|
|
|
|
|
wait for a signal to arrive, and then restore the mask. */
|
|
|
-static int __internal_sigpause (int sig_or_mask, int is_sig)
|
|
|
+static int __sigpause (int sig_or_mask, int is_sig)
|
|
|
{
|
|
|
sigset_t set;
|
|
|
|
|
@@ -50,29 +44,21 @@ static int __internal_sigpause (int sig_or_mask, int is_sig)
|
|
|
|
|
|
sigsuspend() which itself is a cancellation point we do not have
|
|
|
to do anything here. */
|
|
|
- return sigsuspend (&set);
|
|
|
+
|
|
|
+ return __NC(sigsuspend)(&set);
|
|
|
}
|
|
|
-strong_alias(__internal_sigpause,__sigpause)
|
|
|
|
|
|
-#undef sigpause
|
|
|
+int __bsd_sigpause(int mask);
|
|
|
+int __bsd_sigpause(int mask)
|
|
|
+{
|
|
|
+ return __sigpause(mask, 0);
|
|
|
+}
|
|
|
|
|
|
|
|
|
standards demand it. The version which is a bit more reasonable is
|
|
|
the BSD version. So make this the default. */
|
|
|
-int sigpause (int mask)
|
|
|
+static int __NC(sigpause)(int sig)
|
|
|
{
|
|
|
-#ifdef __UCLIBC_HAS_THREADS_NATIVE__
|
|
|
- if (SINGLE_THREAD_P)
|
|
|
- return __internal_sigpause (mask, 0);
|
|
|
-
|
|
|
- int oldtype = LIBC_CANCEL_ASYNC ();
|
|
|
-
|
|
|
- int result = __internal_sigpause (mask, 0);
|
|
|
-
|
|
|
- LIBC_CANCEL_RESET (oldtype);
|
|
|
-
|
|
|
- return result;
|
|
|
-#else
|
|
|
- return __internal_sigpause (mask, 0);
|
|
|
-#endif
|
|
|
+ return __sigpause(sig, 1);
|
|
|
}
|
|
|
+CANCELLABLE_SYSCALL(int, sigpause, (int sig), (sig))
|