rts/RetainerProfile: Dump closure type if push() fails
[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 #include <rts/Stable.h>
17
18 // Initialize the top handler subsystem
19 void initTopHandler(void);
20
21 // Exit the top handler subsystem
22 void exitTopHandler(void);
23
24 // Get the thread that handles ctrl-c, etc
25 // Returns NULL if there is no such thread
26 StgTSO *getTopHandlerThread(void);
27
28 #include <EndPrivate.h>
29
30 // Called from Haskell
31 void rts_setMainThread(StgWeak *ptr);