diff options
author | Carmelo Amoroso <carmelo.amoroso@st.com> | 2009-01-22 14:44:29 +0000 |
---|---|---|
committer | Carmelo Amoroso <carmelo.amoroso@st.com> | 2009-01-22 14:44:29 +0000 |
commit | fa6e328b05204fa7872858517e1a43cfd90aa8d2 (patch) | |
tree | 436f49ce17b9f700c991eddd1228bbaaf0b67fb2 /libc/sysdeps/linux/common/bits/sigset.h | |
parent | 6f8832e0dec5fc1086241e7e381a0920fcf4c8b6 (diff) | |
download | uClibc-alpine-fa6e328b05204fa7872858517e1a43cfd90aa8d2.tar.bz2 uClibc-alpine-fa6e328b05204fa7872858517e1a43cfd90aa8d2.tar.xz |
Synch whole signal handling rework with trunk. Tested on nptl-sh4.
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Diffstat (limited to 'libc/sysdeps/linux/common/bits/sigset.h')
-rw-r--r-- | libc/sysdeps/linux/common/bits/sigset.h | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/libc/sysdeps/linux/common/bits/sigset.h b/libc/sysdeps/linux/common/bits/sigset.h index 75fa32604..2f67a4ebf 100644 --- a/libc/sysdeps/linux/common/bits/sigset.h +++ b/libc/sysdeps/linux/common/bits/sigset.h @@ -22,13 +22,24 @@ typedef int __sig_atomic_t; -/* A `sigset_t' has a bit for each signal. */ - -# define _SIGSET_NWORDS (1024 / (8 * sizeof (unsigned long int))) -typedef struct - { - unsigned long int __val[_SIGSET_NWORDS]; - } __sigset_t; +/* A 'sigset_t' has a bit for each signal. + * glibc has space for 1024 signals (!), but most arches supported + * by Linux have 64 signals, and only MIPS has 128. + * There seems to be some historical baggage in sparc[64] + * where they might have (or had in the past) 32 signals only, + * I hope it's irrelevant now. + * Signal 0 does not exist, so we have signals 1..64, not 0..63. + * In uclibc, kernel and userspace sigset_t is always the same. + * BTW, struct sigaction is also the same on kernel and userspace side. + */ +#if defined(__mips__) +# define _SIGSET_NWORDS (128 / (8 * sizeof (unsigned long))) +#else +# define _SIGSET_NWORDS (64 / (8 * sizeof (unsigned long))) +#endif +typedef struct { + unsigned long __val[_SIGSET_NWORDS]; +} __sigset_t; #endif |