diff options
author | Tamar Christina <tamar@zhox.com> | 2019-06-16 21:30:14 +0100 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2020-07-15 16:41:01 -0400 |
commit | 4bf542bf1cdf2fa468457fc0af21333478293476 (patch) | |
tree | 8378f0fa182d8e829e15fc5d102ba01aa8bd038e /rts/RtsStartup.c | |
parent | 050da6dd42d0cb293c7fce4a5ccdeb5abe1aadb4 (diff) | |
download | haskell-4bf542bf1cdf2fa468457fc0af21333478293476.tar.gz |
winio: Multiple refactorings and support changes.
Diffstat (limited to 'rts/RtsStartup.c')
-rw-r--r-- | rts/RtsStartup.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/rts/RtsStartup.c b/rts/RtsStartup.c index 31f8267708..a52c02190e 100644 --- a/rts/RtsStartup.c +++ b/rts/RtsStartup.c @@ -46,7 +46,8 @@ #endif #if defined(mingw32_HOST_OS) && !defined(THREADED_RTS) -#include "win32/AsyncIO.h" +#include "win32/AsyncMIO.h" +#include "win32/AsyncWinIO.h" #endif #if defined(mingw32_HOST_OS) @@ -299,10 +300,13 @@ hs_init_ghc(int *argc, char **argv[], RtsConfig rts_config) getStablePtr((StgPtr)nestedAtomically_closure); getStablePtr((StgPtr)runSparks_closure); getStablePtr((StgPtr)ensureIOManagerIsRunning_closure); + getStablePtr((StgPtr)interruptIOManager_closure); getStablePtr((StgPtr)ioManagerCapabilitiesChanged_closure); #if !defined(mingw32_HOST_OS) getStablePtr((StgPtr)blockedOnBadFD_closure); getStablePtr((StgPtr)runHandlersPtr_closure); +#else + getStablePtr((StgPtr)processRemoteCompletion_closure); #endif // Initialize the top-level handler system @@ -338,7 +342,10 @@ hs_init_ghc(int *argc, char **argv[], RtsConfig rts_config) #endif #if defined(mingw32_HOST_OS) && !defined(THREADED_RTS) - startupAsyncIO(); + if (is_io_mng_native_p()) + startupAsyncWinIO(); + else + startupAsyncIO(); #endif x86_init_fpu(); @@ -520,7 +527,10 @@ hs_exit_(bool wait_foreign) #endif #if defined(mingw32_HOST_OS) && !defined(THREADED_RTS) - shutdownAsyncIO(wait_foreign); + if (is_io_mng_native_p()) + shutdownAsyncWinIO(wait_foreign); + else + shutdownAsyncIO(wait_foreign); #endif /* free hash table storage */ |