summaryrefslogtreecommitdiff
path: root/rts/IOManager.h
diff options
context:
space:
mode:
authorDuncan Coutts <duncan@well-typed.com>2020-12-28 22:15:06 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-01-25 05:11:14 -0500
commit4ad726fc1a5d062e2df2910d7f39ab81428dddfc (patch)
tree93adbaf8d20c8baa142c8cbb79d4c2c167b64925 /rts/IOManager.h
parente93384e82fb4de5a5ee96949b7c1108bce16a875 (diff)
downloadhaskell-4ad726fc1a5d062e2df2910d7f39ab81428dddfc.tar.gz
Move hooks for I/O manager startup / shutdown into IOManager.{c,h}
Diffstat (limited to 'rts/IOManager.h')
-rw-r--r--rts/IOManager.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/rts/IOManager.h b/rts/IOManager.h
index 713049305f..be9bc3ab1a 100644
--- a/rts/IOManager.h
+++ b/rts/IOManager.h
@@ -21,6 +21,16 @@
#include "BeginPrivate.h"
+/* Init hook: called from hs_init_ghc.
+ */
+void initIOManager(void);
+
+
+/* Shutdown hooks: called from hs_exit_ before and after the scheduler exits.
+ */
+void stopIOManager(void);
+void exitIOManager(bool wait_threads);
+
/*
* Communicating with the IO manager thread (see GHC.Conc).
* Posix implementation in posix/Signals.c
@@ -34,4 +44,12 @@ void ioManagerDie (void);
void ioManagerStart (void);
#endif
+/* Pedantic warning cleanliness
+ */
+#if !defined(THREADED_RTS) && defined(mingw32_HOST_OS)
+#define USED_IF_NOT_THREADS_AND_MINGW32
+#else
+#define USED_IF_NOT_THREADS_AND_MINGW32 STG_UNUSED
+#endif
+
#include "EndPrivate.h"