This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[COMMITTED PATCH] NPTL: Fix generic pthread_sigmask.
- From: Roland McGrath <roland at hack dot frob dot com>
- To: "GNU C. Library" <libc-alpha at sourceware dot org>
- Date: Thu, 8 Jan 2015 14:29:07 -0800 (PST)
- Subject: [COMMITTED PATCH] NPTL: Fix generic pthread_sigmask.
- Authentication-results: sourceware.org; auth=none
Fixes the build of libpthread.so on non-Linux.
(Also some incidental sanity-checking with the #error.)
No effect on existing configurations.
Thanks,
Roland
* nptl/pthread_sigmask.c [SIGCANCEL || SIGTIMER || SIGSETXID]: #error.
(pthread_sigmask): Call sigprocmask, not __sigprocmask.
--- a/nptl/pthread_sigmask.c
+++ b/nptl/pthread_sigmask.c
@@ -18,14 +18,18 @@
#include <errno.h>
#include <signal.h>
+#include <pthreadP.h>
+#if defined SIGCANCEL || defined SIGTIMER || defined SIGSETXID
+# error "This implementation assumes no internal-only signal numbers."
+#endif
int
pthread_sigmask (int how, const sigset_t *newmask, sigset_t *oldmask)
{
/* Here we assume that sigprocmask actually does everything right.
The only difference is the return value protocol. */
- int result = __sigprocmask (how, newmask, oldmask);
+ int result = sigprocmask (how, newmask, oldmask);
if (result < 0)
result = errno;
return result;