Loading...
--- Libc/Libc-320/sys/sigsuspend.c
+++ Libc/Libc-583/sys/sigsuspend.c
@@ -2,8 +2,6 @@
* Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
*
* @APPLE_LICENSE_HEADER_START@
- *
- * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved.
*
* This file contains Original Code and/or Modifications of Original Code
* as defined in and that are subject to the Apple Public Source License
@@ -24,21 +22,28 @@
*/
/* @(#)sigsuspend.c 1.0 9/22/95 (c) 1995 NeXT */
-#include <sys/signal.h>
-#include <sys/syscall.h>
+#include <signal.h>
#include <unistd.h>
+#ifdef VARIANT_CANCELABLE
+int __sigsuspend (const sigset_t);
+#else /* !VARIANT_CANCELABLE */
+int __sigsuspend_nocancel(const sigset_t);
+#endif /* VARIANT_CANCELABLE */
+
int
-sigsuspend (
- const sigset_t *sigmask_p
-)
+sigsuspend (const sigset_t *sigmask_p)
{
sigset_t mask;
-
+
if (sigmask_p)
mask = *sigmask_p;
else
sigemptyset(&mask);
- return syscall (SYS_sigsuspend, mask);
+#ifdef VARIANT_CANCELABLE
+ return __sigsuspend(mask);
+#else /* !VARIANT_CANCELABLE */
+ return __sigsuspend_nocancel(mask);
+#endif /* VARIANT_CANCELABLE */
}