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