[git commit] libc/pause: Enable pause_nocancel for arches without __NR_pause

Bernhard Reutner-Fischer rep.dot.nop at gmail.com
Wed Feb 27 21:16:12 UTC 2013


commit: http://git.uclibc.org/uClibc/commit/?id=49d3f93362c7eb359f82a4d9204a0519f73f3820
branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/master

Signed-off-by: Markos Chandras <markos.chandras at imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop at gmail.com>
---
 libc/sysdeps/linux/common/not-cancel.h |    6 ++++--
 libc/sysdeps/linux/common/pause.c      |    4 ++--
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/libc/sysdeps/linux/common/not-cancel.h b/libc/sysdeps/linux/common/not-cancel.h
index 08dab8c..acf8e39 100644
--- a/libc/sysdeps/linux/common/not-cancel.h
+++ b/libc/sysdeps/linux/common/not-cancel.h
@@ -102,9 +102,11 @@ extern int __openat64_nocancel (int fd, const char *fname, int oflag,
 #ifdef __NR_pause
 # define pause_not_cancel() \
   INLINE_SYSCALL (pause, 0)
-/*#else
+#else
+# include <unistd.h>
+extern __typeof(pause) __pause_nocancel;
 # define pause_not_cancel() \
-  __pause_nocancel ()*/
+  __pause_nocancel ()
 #endif
 
 /* Uncancelable nanosleep.  */
diff --git a/libc/sysdeps/linux/common/pause.c b/libc/sysdeps/linux/common/pause.c
index 32fe839..c35ecd5 100644
--- a/libc/sysdeps/linux/common/pause.c
+++ b/libc/sysdeps/linux/common/pause.c
@@ -25,7 +25,7 @@ int
 # ifdef __LINUXTHREADS_OLD__
 weak_function
 # endif
-pause(void)
+__NC(pause)(void)
 {
 	sigset_t set;
 
@@ -36,6 +36,6 @@ pause(void)
 	   So no need for anything special here.  */
 	return sigsuspend(&set);
 }
-lt_strong_alias(pause)
+CANCELLABLE_SYSCALL(int, pause, (void), ())
 LIBC_CANCEL_HANDLED ();		/* sigsuspend handles our cancellation.  */
 #endif


More information about the uClibc-cvs mailing list