]> git.proxmox.com Git - mirror_spl-debian.git/blob - include/sys/signal.h
Go through and add a header with the proper UCRL number.
[mirror_spl-debian.git] / include / sys / signal.h
1 /*
2 * This file is part of the SPL: Solaris Porting Layer.
3 *
4 * Copyright (c) 2008 Lawrence Livermore National Security, LLC.
5 * Produced at Lawrence Livermore National Laboratory
6 * Written by:
7 * Brian Behlendorf <behlendorf1@llnl.gov>,
8 * Herb Wartens <wartens2@llnl.gov>,
9 * Jim Garlick <garlick@llnl.gov>
10 * UCRL-CODE-235197
11 *
12 * This is free software; you can redistribute it and/or modify it
13 * under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 2 of the License, or
15 * (at your option) any later version.
16 *
17 * This is distributed in the hope that it will be useful, but WITHOUT
18 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
19 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
20 * for more details.
21 *
22 * You should have received a copy of the GNU General Public License along
23 * with this program; if not, write to the Free Software Foundation, Inc.,
24 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
25 */
26
27 #ifndef _SPL_SIGNAL_H
28 #define _SPL_SIGNAL_H
29
30 #define FORREAL 0 /* Usual side-effects */
31 #define JUSTLOOKING 1 /* Don't stop the process */
32
33 /* The "why" argument indicates the allowable side-effects of the call:
34 *
35 * FORREAL: Extract the next pending signal from p_sig into p_cursig;
36 * stop the process if a stop has been requested or if a traced signal
37 * is pending.
38 *
39 * JUSTLOOKING: Don't stop the process, just indicate whether or not
40 * a signal might be pending (FORREAL is needed to tell for sure).
41 */
42 static __inline__ int
43 issig(int why)
44 {
45 ASSERT(why == FORREAL || why == JUSTLOOKING);
46
47 return signal_pending(current);
48 }
49
50 #endif /* SPL_SIGNAL_H */