diff options
author | Eric Andersen <andersen@codepoet.org> | 2006-12-07 23:24:02 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2006-12-07 23:24:02 +0000 |
commit | 1478c2de052374c6356db5513749a144c13791b1 (patch) | |
tree | 3b22a3f8361f94c99508c497e240ecb71acf8641 /libc/sysdeps/linux/common/sigprocmask.c | |
parent | 99d6c367c4820a072dc4ada51561df17e2093778 (diff) |
Major cleanup of internal mutex locking. Be more consistant in how we do
things, and avoid potential deadlocks caused when a thread holding a uClibc
internal lock get canceled and terminates without releasing the lock. This
change also provides a single place, bits/uClibc_mutex.h, for thread libraries
to modify to change all instances of internal locking.
Diffstat (limited to 'libc/sysdeps/linux/common/sigprocmask.c')
-rw-r--r-- | libc/sysdeps/linux/common/sigprocmask.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libc/sysdeps/linux/common/sigprocmask.c b/libc/sysdeps/linux/common/sigprocmask.c index cbaea0f62..b90e19f03 100644 --- a/libc/sysdeps/linux/common/sigprocmask.c +++ b/libc/sysdeps/linux/common/sigprocmask.c @@ -26,6 +26,8 @@ int sigprocmask(int how, const sigset_t * set, sigset_t * oldset) if (set && # if (SIG_BLOCK == 0) && (SIG_UNBLOCK == 1) && (SIG_SETMASK == 2) (((unsigned int) how) > 2) +#elif (SIG_BLOCK == 1) && (SIG_UNBLOCK == 2) && (SIG_SETMASK == 3) + (((unsigned int)(how-1)) > 2) # else # warning "compile time assumption violated.. slow path..." ((how != SIG_BLOCK) && (how != SIG_UNBLOCK) @@ -51,6 +53,8 @@ int sigprocmask(int how, const sigset_t * set, sigset_t * oldset) if (set && # if (SIG_BLOCK == 0) && (SIG_UNBLOCK == 1) && (SIG_SETMASK == 2) (((unsigned int) how) > 2) +#elif (SIG_BLOCK == 1) && (SIG_UNBLOCK == 2) && (SIG_SETMASK == 3) + (((unsigned int)(how-1)) > 2) # else # warning "compile time assumption violated.. slow path..." ((how != SIG_BLOCK) && (how != SIG_UNBLOCK) |