diff options
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/signal.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/linux/signal.h b/include/linux/signal.h index ea9eff16c4b7..b7d093520bb6 100644 --- a/include/linux/signal.h +++ b/include/linux/signal.h | |||
@@ -94,6 +94,23 @@ static inline int sigfindinword(unsigned long word) | |||
94 | 94 | ||
95 | #endif /* __HAVE_ARCH_SIG_BITOPS */ | 95 | #endif /* __HAVE_ARCH_SIG_BITOPS */ |
96 | 96 | ||
97 | static inline int sigisemptyset(sigset_t *set) | ||
98 | { | ||
99 | extern void _NSIG_WORDS_is_unsupported_size(void); | ||
100 | switch (_NSIG_WORDS) { | ||
101 | case 4: | ||
102 | return (set->sig[3] | set->sig[2] | | ||
103 | set->sig[1] | set->sig[0]) == 0; | ||
104 | case 2: | ||
105 | return (set->sig[1] | set->sig[0]) == 0; | ||
106 | case 1: | ||
107 | return set->sig[0] == 0; | ||
108 | default: | ||
109 | _NSIG_WORDS_is_unsupported_size(); | ||
110 | return 0; | ||
111 | } | ||
112 | } | ||
113 | |||
97 | #define sigmask(sig) (1UL << ((sig) - 1)) | 114 | #define sigmask(sig) (1UL << ((sig) - 1)) |
98 | 115 | ||
99 | #ifndef __HAVE_ARCH_SIG_SETOPS | 116 | #ifndef __HAVE_ARCH_SIG_SETOPS |