]> git.proxmox.com Git - mirror_spl.git/blob - include/sys/signal.h
Minimal signal handling interface.
[mirror_spl.git] / include / sys / signal.h
1 #ifndef _SPL_SIGNAL_H
2 #define _SPL_SIGNAL_H
3
4 #define FORREAL 0 /* Usual side-effects */
5 #define JUSTLOOKING 1 /* Don't stop the process */
6
7 /* The "why" argument indicates the allowable side-effects of the call:
8 *
9 * FORREAL: Extract the next pending signal from p_sig into p_cursig;
10 * stop the process if a stop has been requested or if a traced signal
11 * is pending.
12 *
13 * JUSTLOOKING: Don't stop the process, just indicate whether or not
14 * a signal might be pending (FORREAL is needed to tell for sure).
15 */
16 static __inline__ int
17 issig(int why)
18 {
19 BUG_ON(!(why == FORREAL || why == JUSTLOOKING));
20
21 return signal_pending(current);
22 }
23
24 #endif /* SPL_SIGNAL_H */