summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rts/IOManager.c21
-rw-r--r--rts/IOManager.h25
-rw-r--r--rts/rts.cabal.in1
3 files changed, 47 insertions, 0 deletions
diff --git a/rts/IOManager.c b/rts/IOManager.c
new file mode 100644
index 0000000000..533edbf45e
--- /dev/null
+++ b/rts/IOManager.c
@@ -0,0 +1,21 @@
+/* -----------------------------------------------------------------------------
+ *
+ * (c) The GHC Team 1998-2020
+ *
+ * Hooks for the I/O subsystem(s) that are called from other parts of the RTS.
+ *
+ * There are several different I/O subsystem implementations (aka I/O managers),
+ * for different platforms (notably Windows vs others), and for the threaded vs
+ * non-threaded RTS. These implementations all need hooks into other parts of
+ * the RTS, such as startup/shutdown, the scheduler and other special features.
+ *
+ * To keep things comprehensible, all the hooks used by all the different I/O
+ * subsystem implementations are centralised here. Not all implementations use
+ * all hooks.
+ *
+ * -------------------------------------------------------------------------*/
+
+#include "Rts.h"
+#include "rts/IOInterface.h" // exported
+#include "IOManager.h" // RTS internal
+
diff --git a/rts/IOManager.h b/rts/IOManager.h
new file mode 100644
index 0000000000..da322c6e40
--- /dev/null
+++ b/rts/IOManager.h
@@ -0,0 +1,25 @@
+/* -----------------------------------------------------------------------------
+ *
+ * (c) The GHC Team 1998-2020
+ *
+ * Prototypes for functions in IOManager.c and elsewhere
+ *
+ * Hooks for the I/O subsystem(s) that are called from other parts of the RTS.
+ *
+ * There are several different I/O subsystem implementations (aka I/O managers),
+ * for different platforms (notably Windows vs others), and for the threaded vs
+ * non-threaded RTS. These implementations all need hooks into other parts of
+ * the RTS, such as startup/shutdown, the scheduler and other special features.
+ *
+ * To keep things comprehensible, all the hooks used by all the different I/O
+ * subsystem implementations are centralised here. Not all implementations use
+ * all hooks.
+ *
+ * -------------------------------------------------------------------------*/
+
+#pragma once
+
+#include "BeginPrivate.h"
+
+
+#include "EndPrivate.h"
diff --git a/rts/rts.cabal.in b/rts/rts.cabal.in
index b98a6eaca7..ed727111ca 100644
--- a/rts/rts.cabal.in
+++ b/rts/rts.cabal.in
@@ -433,6 +433,7 @@ library
HsFFI.c
Inlines.c
Interpreter.c
+ IOManager.c
LdvProfile.c
Libdw.c
LibdwPool.c