summaryrefslogtreecommitdiff
path: root/includes/RtsExternal.h
diff options
context:
space:
mode:
authorSimon Marlow <simonmar@microsoft.com>2006-12-01 14:48:23 +0000
committerSimon Marlow <simonmar@microsoft.com>2006-12-01 14:48:23 +0000
commit80a766fdb6864eae613962e43ad9eb371e0ce80c (patch)
tree85bb6589d0b8f138b721f01d4b5337ff87ba9b11 /includes/RtsExternal.h
parentde6c8e5293c9ef68b597ab2e6d55c3f42a283489 (diff)
downloadhaskell-80a766fdb6864eae613962e43ad9eb371e0ce80c.tar.gz
Add support for the IO manager thread on Windows
Fixes #637. The implications of this change are: - threadDelay on Windows no longer creates a new OS thread each time, instead it communicates with the IO manager thread in the same way as on Unix. - deadlock detection now works the same way on Windows as on Unix; that is the timer interrupt wakes up the IO manager thread, which causes the scheduler to check for deadlock. - Console events now get sent to the IO manager thread, in the same way as signals do on Unix. This means that console events should behave more reliably with -threaded on Windows. All this applies only with -threaded. Without -threaded, the old ConsoleEvent code is still used. After some testing, this could be pushed to the 6.6 branch.
Diffstat (limited to 'includes/RtsExternal.h')
-rw-r--r--includes/RtsExternal.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/includes/RtsExternal.h b/includes/RtsExternal.h
index 8e1a26acab..bf581b7a2b 100644
--- a/includes/RtsExternal.h
+++ b/includes/RtsExternal.h
@@ -73,10 +73,19 @@ extern void rts_ConsoleHandlerDone ( int ev );
extern int stg_sig_install (int, int, StgStablePtr *, void *);
#endif
-#if !defined(mingw32_HOST_OS)
+#if defined(mingw32_HOST_OS)
+extern StgInt console_handler;
+#else
extern StgInt *signal_handlers;
#endif
+
+#if defined(mingw32_HOST_OS)
+void *getIOManagerEvent (void);
+StgWord32 readIOManagerEvent (void);
+void sendIOManagerEvent (StgWord32 event);
+#else
extern void setIOManagerPipe (int fd);
+#endif
extern void* allocateExec(unsigned int len);