summaryrefslogtreecommitdiff
path: root/libc/sysdeps
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2011-04-21 21:58:18 +0200
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2012-06-15 14:00:40 +0200
commit2d9054b39afa83825168c21ef8266c6c2ae82c3e (patch)
tree33d99f87ad1f63e5a4ca86774c5c861c62698d7e /libc/sysdeps
parent6c7c4fb8e1ff2d7d170af3f50acd4cdc30f608f6 (diff)
pause.c: use cancel.h, provide __libc_pause only for LT_OLD
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Diffstat (limited to 'libc/sysdeps')
-rw-r--r--libc/sysdeps/linux/common/pause.c33
1 files changed, 12 insertions, 21 deletions
diff --git a/libc/sysdeps/linux/common/pause.c b/libc/sysdeps/linux/common/pause.c
index a77c4d581..8a4d82177 100644
--- a/libc/sysdeps/linux/common/pause.c
+++ b/libc/sysdeps/linux/common/pause.c
@@ -10,32 +10,23 @@
#define __need_NULL
#include <stddef.h>
#include <unistd.h>
-
-#ifdef __UCLIBC_HAS_THREADS_NATIVE__
-#include <sysdep-cancel.h>
-#endif
-
#include <signal.h>
+#include <cancel.h>
-/* Suspend the process until a signal arrives.
- This always returns -1 and sets errno to EINTR. */
-extern __typeof(pause) __libc_pause;
int
-__libc_pause (void)
+#ifdef __LINUXTHREADS_OLD__
+weak_function
+#endif
+pause(void)
{
- sigset_t set;
+ sigset_t set;
- /*__sigemptyset (&set); - why? */
- sigprocmask (SIG_BLOCK, NULL, &set);
+ /*__sigemptyset (&set); - why? */
+ sigprocmask (SIG_BLOCK, NULL, &set);
- /* pause is a cancellation point, but so is sigsuspend.
- So no need for anything special here. */
-
- return sigsuspend (&set);
+ /* pause is a cancellation point, but so is sigsuspend.
+ So no need for anything special here. */
+ return sigsuspend(&set);
}
-weak_alias (__libc_pause, pause)
-
-#ifdef __UCLIBC_HAS_THREADS_NATIVE__
+lt_strong_alias(pause)
LIBC_CANCEL_HANDLED (); /* sigsuspend handles our cancellation. */
-#endif
-