summaryrefslogtreecommitdiff
path: root/rts/TopHandler.h
blob: fddebb05ef9dbd930126034a7314b95cb0d4a613 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/* -----------------------------------------------------------------------------
 *
 * (c) The GHC Team, 2016
 *
 * Top-level handler support
 *
 * ---------------------------------------------------------------------------*/

#include <BeginPrivate.h>
#include <rts/Types.h>
#include <rts/storage/Closures.h>
#include <stg/Types.h>
#include <rts/Stable.h>
// Initialize the top handler subsystem
void initTopHandler(void);

// Exit the top handler subsystem
void exitTopHandler(void);

// Get the thread that handles ctrl-c, etc
// Returns NULL if there is no such thread
StgTSO *getTopHandlerThread(void);

#include <EndPrivate.h>

// Called from Haskell
void rts_setMainThread(StgWeak *ptr);