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