1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 #ifndef EMACS_SYSSIGNAL_H
21 #define EMACS_SYSSIGNAL_H
22
23 #include <signal.h>
24
25 #include <attribute.h>
26
27 extern void init_signals (void);
28 extern void block_child_signal (sigset_t *);
29 extern void unblock_child_signal (sigset_t const *);
30 extern void block_interrupt_signal (sigset_t *);
31 extern void restore_signal_mask (sigset_t const *);
32 extern void block_tty_out_signal (sigset_t *);
33 extern void unblock_tty_out_signal (sigset_t const *);
34
35 #ifdef HAVE_PTHREAD
36 #include <pthread.h>
37
38
39 #define FORWARD_SIGNAL_TO_MAIN_THREAD
40 #endif
41
42
43
44 #if defined CYGWIN && !defined SIGEV_SIGNAL
45 #define SIGEV_SIGNAL SIGEV_SIGNAL
46 #endif
47
48 #if defined HAVE_TIMER_SETTIME && defined SIGEV_SIGNAL
49 # define HAVE_ITIMERSPEC
50 #endif
51
52 #if (defined SIGPROF && !defined PROFILING \
53 && (defined HAVE_SETITIMER || defined HAVE_ITIMERSPEC))
54 # define PROFILER_CPU_SUPPORT
55 #endif
56
57 extern sigset_t empty_mask;
58
59 typedef void (*signal_handler_t) (int);
60
61 extern void emacs_sigaction_init (struct sigaction *, signal_handler_t);
62 char const *safe_strsignal (int) ATTRIBUTE_CONST;
63
64 #if NSIG < NSIG_MINIMUM
65 # undef NSIG
66 # define NSIG NSIG_MINIMUM
67 #endif
68
69 #ifndef SA_SIGINFO
70 # define SA_SIGINFO 0
71 #endif
72
73 #ifndef emacs_raise
74 # define emacs_raise(sig) raise (sig)
75 #endif
76
77 #ifndef HAVE_STRSIGNAL
78 # define strsignal(sig) safe_strsignal (sig)
79 #endif
80
81 void deliver_process_signal (int, signal_handler_t);
82
83 #endif