Commit | Line | Data |
---|---|---|
9ab9afa9 | 1 | /* syssignal.h - System-dependent definitions for signals. |
99cf43f9 | 2 | |
ab422c4d | 3 | Copyright (C) 1993, 1999, 2001-2013 Free Software Foundation, Inc. |
9ab9afa9 JB |
4 | |
5 | This file is part of GNU Emacs. | |
6 | ||
b9b1cc14 | 7 | GNU Emacs is free software: you can redistribute it and/or modify |
9ab9afa9 | 8 | it under the terms of the GNU General Public License as published by |
b9b1cc14 GM |
9 | the Free Software Foundation, either version 3 of the License, or |
10 | (at your option) any later version. | |
9ab9afa9 JB |
11 | |
12 | GNU Emacs is distributed in the hope that it will be useful, | |
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 | GNU General Public License for more details. | |
16 | ||
17 | You should have received a copy of the GNU General Public License | |
b9b1cc14 | 18 | along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ |
9ab9afa9 | 19 | |
2fe28299 | 20 | #include <signal.h> |
4d7e6e51 | 21 | #include <stdbool.h> |
2fe28299 | 22 | |
4d7e6e51 | 23 | extern void init_signals (bool); |
2b98b088 | 24 | |
ae9e757a | 25 | #ifdef HAVE_PTHREAD |
333f1b6f | 26 | #include <pthread.h> |
f8240abd YM |
27 | /* If defined, asynchronous signals delivered to a non-main thread are |
28 | forwarded to the main thread. */ | |
29 | #define FORWARD_SIGNAL_TO_MAIN_THREAD | |
30 | #endif | |
31 | ||
2b794d69 PE |
32 | #if defined HAVE_TIMER_SETTIME && defined SIGEV_SIGNAL |
33 | # define HAVE_ITIMERSPEC | |
34 | #endif | |
35 | ||
36 | #if (defined SIGPROF && !defined PROFILING \ | |
37 | && (defined HAVE_SETITIMER || defined HAVE_ITIMERSPEC)) | |
d89460ed PE |
38 | # define PROFILER_CPU_SUPPORT |
39 | #endif | |
40 | ||
1fa53021 | 41 | extern sigset_t empty_mask; |
9ab9afa9 | 42 | |
9af30bdf | 43 | typedef void (*signal_handler_t) (int); |
ae877222 | 44 | |
2fe28299 | 45 | extern void emacs_sigaction_init (struct sigaction *, signal_handler_t); |
c622b48f | 46 | char const *safe_strsignal (int) ATTRIBUTE_CONST; |
2fe28299 | 47 | |
68c45bf0 | 48 | #if NSIG < NSIG_MINIMUM |
2fe28299 | 49 | # undef NSIG |
68c45bf0 PE |
50 | # define NSIG NSIG_MINIMUM |
51 | #endif | |
52 | ||
4d7e6e51 PE |
53 | #ifndef emacs_raise |
54 | # define emacs_raise(sig) raise (sig) | |
55 | #endif | |
56 | ||
68c45bf0 | 57 | #ifndef HAVE_STRSIGNAL |
aa1ba90e | 58 | # define strsignal(sig) safe_strsignal (sig) |
68c45bf0 | 59 | #endif |
ab5796a9 | 60 | |
4d7e6e51 | 61 | void deliver_process_signal (int, signal_handler_t); |