Building GHC with hadrian on FreeBSD
[ghc.git] / rts / RtsSignals.h
1 /* -----------------------------------------------------------------------------
2 *
3 * (c) The GHC Team, 1998-2005
4 *
5 * Signal processing / handling.
6 *
7 * ---------------------------------------------------------------------------*/
8
9 #pragma once
10
11 #if !defined(mingw32_HOST_OS)
12
13 #include "posix/Signals.h"
14
15 #elif defined(mingw32_HOST_OS)
16
17 #include "win32/ConsoleHandler.h"
18
19 #else
20
21 #define signals_pending() (false)
22
23 #endif
24
25 #if RTS_USER_SIGNALS
26
27 #include "BeginPrivate.h"
28
29 /*
30 * Function: initUserSignals()
31 *
32 * Initialize the console handling substrate.
33 */
34 void initUserSignals(void);
35
36 /*
37 * Function: initDefaultHandlers()
38 *
39 * Install any default signal/console handlers. Currently we install a
40 * Ctrl+C handler that shuts down the RTS in an orderly manner.
41 */
42 void initDefaultHandlers(void);
43 void resetDefaultHandlers(void);
44
45 void freeSignalHandlers(void);
46
47 /*
48 * Function: awaitUserSignals()
49 *
50 * Wait for the next console event. Currently a NOP (returns immediately.)
51 */
52 void awaitUserSignals(void);
53
54 #include "EndPrivate.h"
55
56 #endif /* RTS_USER_SIGNALS */