d28182140018cbef8718b6693b31d817a54b4bd3
[ghc.git] / rts / posix / Signals.h
1 /* -----------------------------------------------------------------------------
2 *
3 * (c) The GHC Team, 1998-2005
4 *
5 * Signal processing / handling.
6 *
7 * ---------------------------------------------------------------------------*/
8
9 #ifndef POSIX_SIGNALS_H
10 #define POSIX_SIGNALS_H
11
12 #ifdef HAVE_SIGNAL_H
13 # include <signal.h>
14 #endif
15
16 #include "Ticker.h"
17
18 #include "BeginPrivate.h"
19
20 bool anyUserHandlers(void);
21
22 #if !defined(THREADED_RTS)
23 extern siginfo_t pending_handler_buf[];
24 extern siginfo_t *next_pending_handler;
25 #define signals_pending() (next_pending_handler != pending_handler_buf)
26 void startSignalHandlers(Capability *cap);
27 #endif
28
29 void install_vtalrm_handler(int sig, TickProc handle_tick);
30
31 void ioManagerStartCap (/* inout */ Capability **cap);
32
33 extern StgInt *signal_handlers;
34
35 #include "EndPrivate.h"
36
37 #endif /* POSIX_SIGNALS_H */