1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-29 11:41:21 +03:00

linux: Consolidate sigprocmask

All architectures now uses the Linux generic implementation which
uses __NR_rt_sigprocmask.

Checked on x86_64-linux-gnu, sparc64-linux-gnu, ia64-linux-gnu,
s390x-linux-gnu, and alpha-linux-gnu.
This commit is contained in:
Adhemerval Zanella
2019-12-05 08:03:21 -03:00
parent 58bd592536
commit dc86199477
6 changed files with 3 additions and 220 deletions

View File

@ -15,17 +15,9 @@
License along with the GNU C Library; if not, see
<https://www.gnu.org/licenses/>. */
#include <errno.h>
#include <signal.h>
#include <string.h> /* Needed for string function builtin redirection. */
#include <unistd.h>
#include <sysdep.h>
#include <sys/syscall.h>
#include <nptl/pthreadP.h> /* SIGCANCEL, SIGSETXID */
/* Get and/or change the set of blocked signals. */
int
__sigprocmask (int how, const sigset_t *set, sigset_t *oset)
@ -35,8 +27,8 @@ __sigprocmask (int how, const sigset_t *set, sigset_t *oset)
/* The only thing we have to make sure here is that SIGCANCEL and
SIGSETXID are not blocked. */
if (set != NULL
&& (__builtin_expect (__sigismember (set, SIGCANCEL), 0)
|| __builtin_expect (__sigismember (set, SIGSETXID), 0)))
&& __glibc_unlikely (__sigismember (set, SIGCANCEL)
|| __glibc_unlikely (__sigismember (set, SIGSETXID))))
{
local_newmask = *set;
__sigdelset (&local_newmask, SIGCANCEL);
@ -44,7 +36,7 @@ __sigprocmask (int how, const sigset_t *set, sigset_t *oset)
set = &local_newmask;
}
return INLINE_SYSCALL (rt_sigprocmask, 4, how, set, oset, _NSIG / 8);
return INLINE_SYSCALL_CALL (rt_sigprocmask, how, set, oset, _NSIG / 8);
}
libc_hidden_def (__sigprocmask)
weak_alias (__sigprocmask, sigprocmask)