1 /* -----------------------------------------------------------------------------
3 * (c) The GHC Team, 2016
5 * Top-level handler support
7 * ---------------------------------------------------------------------------*/
11 #include <BeginPrivate.h>
13 #include <rts/Types.h>
14 #include <rts/storage/Closures.h>
15 #include <stg/Types.h>
17 // Initialize the top handler subsystem
18 void initTopHandler(void);
20 // Exit the top handler subsystem
21 void exitTopHandler(void);
23 // Get the thread that handles ctrl-c, etc
24 // Returns NULL if there is no such thread
25 StgTSO
*getTopHandlerThread(void);
27 #include <EndPrivate.h>
29 // Called from Haskell
30 void rts_setMainThread(StgWeak
*ptr
);