summaryrefslogtreecommitdiff
path: root/rts/TopHandler.h
diff options
context:
space:
mode:
Diffstat (limited to 'rts/TopHandler.h')
-rw-r--r--rts/TopHandler.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/rts/TopHandler.h b/rts/TopHandler.h
new file mode 100644
index 0000000000..fddebb05ef
--- /dev/null
+++ b/rts/TopHandler.h
@@ -0,0 +1,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);