Lines Matching refs:sig

67 signal_nothrow (int sig, handler_t handler)  in signal_nothrow()  argument
73 result = signal (sig, handler); in signal_nothrow()
95 ext_signal (int sig, handler_t handler) in ext_signal() argument
97 switch (sig) in ext_signal()
106 return signal (sig, handler); in ext_signal()
114 sigismember (const sigset_t *set, int sig) in sigismember() argument
116 if (sig >= 0 && sig < NSIG) in sigismember()
119 if (sig == SIGABRT_COMPAT) in sigismember()
120 sig = SIGABRT; in sigismember()
123 return (*set >> sig) & 1; in sigismember()
137 sigaddset (sigset_t *set, int sig) in sigaddset() argument
139 if (sig >= 0 && sig < NSIG) in sigaddset()
142 if (sig == SIGABRT_COMPAT) in sigaddset()
143 sig = SIGABRT; in sigaddset()
146 *set |= 1U << sig; in sigaddset()
157 sigdelset (sigset_t *set, int sig) in sigdelset() argument
159 if (sig >= 0 && sig < NSIG) in sigdelset()
162 if (sig == SIGABRT_COMPAT) in sigdelset()
163 sig = SIGABRT; in sigdelset()
166 *set &= ~(1U << sig); in sigdelset()
192 blocked_handler (int sig) in blocked_handler() argument
199 signal (sig, blocked_handler); in blocked_handler()
200 if (sig >= 0 && sig < NSIG) in blocked_handler()
201 pending_array[sig] = 1; in blocked_handler()
208 int sig; in sigpending() local
210 for (sig = 0; sig < NSIG; sig++) in sigpending()
211 if (pending_array[sig]) in sigpending()
212 pending |= 1U << sig; in sigpending()
253 int sig; in sigprocmask() local
255 for (sig = 0; sig < NSIG; sig++) in sigprocmask()
256 if ((to_block >> sig) & 1) in sigprocmask()
258 pending_array[sig] = 0; in sigprocmask()
259 if ((old_handlers[sig] = signal (sig, blocked_handler)) != SIG_ERR) in sigprocmask()
260 blocked_set |= 1U << sig; in sigprocmask()
267 int sig; in sigprocmask() local
269 for (sig = 0; sig < NSIG; sig++) in sigprocmask()
270 if ((to_unblock >> sig) & 1) in sigprocmask()
272 if (signal (sig, old_handlers[sig]) != blocked_handler) in sigprocmask()
277 received[sig] = pending_array[sig]; in sigprocmask()
278 blocked_set &= ~(1U << sig); in sigprocmask()
279 pending_array[sig] = 0; in sigprocmask()
282 received[sig] = 0; in sigprocmask()
284 for (sig = 0; sig < NSIG; sig++) in sigprocmask()
285 if (received[sig]) in sigprocmask()
286 raise (sig); in sigprocmask()
295 rpl_signal (int sig, handler_t handler) in rpl_signal() argument
299 if (sig >= 0 && sig < NSIG && sig != SIGKILL && sig != SIGSTOP in rpl_signal()
303 if (sig == SIGABRT_COMPAT) in rpl_signal()
304 sig = SIGABRT; in rpl_signal()
307 if (blocked_set & (1U << sig)) in rpl_signal()
318 handler_t result = old_handlers[sig]; in rpl_signal()
319 old_handlers[sig] = handler; in rpl_signal()
323 return signal (sig, handler); in rpl_signal()