diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2020-04-23 10:58:01 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2020-07-07 14:10:58 -0300 |
commit | f26d456b98abf02b3ff92f1a3c0d4473b7ffd85c (patch) | |
tree | e61f7a38a3f7ce9b8394d1ce8001cf6a3a9dc33e /sysdeps/unix/sysv/linux/aio_misc.h | |
parent | f13d260190d47bd38c0ae939080001e7bb58bd04 (diff) | |
download | glibc-f26d456b98abf02b3ff92f1a3c0d4473b7ffd85c.tar glibc-f26d456b98abf02b3ff92f1a3c0d4473b7ffd85c.tar.gz glibc-f26d456b98abf02b3ff92f1a3c0d4473b7ffd85c.tar.bz2 glibc-f26d456b98abf02b3ff92f1a3c0d4473b7ffd85c.zip |
linux: Fix __NSIG_WORDS and add __NSIG_BYTES
The __NSIG_WORDS value is based on minimum number of words to hold
the maximum number of signals supported by the architecture.
This patch also adds __NSIG_BYTES, which is the number of bytes
required to represent the supported number of signals. It is used in
syscalls which takes a sigset_t.
Checked on x86_64-linux-gnu and i686-linux-gnu.
Tested-by: Carlos O'Donell <carlos@redhat.com>
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Diffstat (limited to 'sysdeps/unix/sysv/linux/aio_misc.h')
-rw-r--r-- | sysdeps/unix/sysv/linux/aio_misc.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sysdeps/unix/sysv/linux/aio_misc.h b/sysdeps/unix/sysv/linux/aio_misc.h index 30c3cd778e..e31ca8edbe 100644 --- a/sysdeps/unix/sysv/linux/aio_misc.h +++ b/sysdeps/unix/sysv/linux/aio_misc.h @@ -31,7 +31,8 @@ __aio_start_notify_thread (void) { sigset_t ss; sigemptyset (&ss); - INTERNAL_SYSCALL_CALL (rt_sigprocmask, SIG_SETMASK, &ss, NULL, _NSIG / 8); + INTERNAL_SYSCALL_CALL (rt_sigprocmask, SIG_SETMASK, &ss, NULL, + __NSIG_BYTES); } extern inline int @@ -52,12 +53,14 @@ __aio_create_helper_thread (pthread_t *threadp, void *(*tf) (void *), sigset_t ss; sigset_t oss; sigfillset (&ss); - INTERNAL_SYSCALL_CALL (rt_sigprocmask, SIG_SETMASK, &ss, &oss, _NSIG / 8); + INTERNAL_SYSCALL_CALL (rt_sigprocmask, SIG_SETMASK, &ss, &oss, + __NSIG_BYTES); int ret = pthread_create (threadp, &attr, tf, arg); /* Restore the signal mask. */ - INTERNAL_SYSCALL_CALL (rt_sigprocmask, SIG_SETMASK, &oss, NULL, _NSIG / 8); + INTERNAL_SYSCALL_CALL (rt_sigprocmask, SIG_SETMASK, &oss, NULL, + __NSIG_BYTES); (void) pthread_attr_destroy (&attr); return ret; |