Another improvement to SetLevels
[ghc.git] / rts / TopHandler.h
1 /* -----------------------------------------------------------------------------
2 *
3 * (c) The GHC Team, 2016
4 *
5 * Top-level handler support
6 *
7 * ---------------------------------------------------------------------------*/
8
9 #include <BeginPrivate.h>
10 #include <rts/Types.h>
11 #include <rts/storage/Closures.h>
12 #include <stg/Types.h>
13 #include <rts/Stable.h>
14 // Initialize the top handler subsystem
15 void initTopHandler(void);
16
17 // Exit the top handler subsystem
18 void exitTopHandler(void);
19
20 // Get the thread that handles ctrl-c, etc
21 // Returns NULL if there is no such thread
22 StgTSO *getTopHandlerThread(void);
23
24 #include <EndPrivate.h>
25
26 // Called from Haskell
27 void rts_setMainThread(StgWeak *ptr);