[Git][ghc/ghc][wip/dcoutts/io-manager-feature-bitset] Deleted 1 commit: Remove is_io_mng_native_p helper, replacing with iomgr_type
Duncan Coutts pushed to branch wip/dcoutts/io-manager-feature-bitset at Glasgow Haskell Compiler / GHC WARNING: The push did not contain any new commits, but force pushed to delete the commits and changes below. Deleted commits: 02d23436 by Duncan Coutts at 2026-09-16T13:38:38+01:00 Remove is_io_mng_native_p helper, replacing with iomgr_type The comment said: Temporary compat helper function used in the Win32 I/O managers. TODO: replace by consulting the iomgr_type global instead. - - - - - 5 changed files: - rts/IOManager.c - rts/IOManager.h - rts/RtsStartup.c - rts/win32/AwaitEvent.c - rts/win32/ThrIOManager.c Changes: ===================================== rts/IOManager.c ===================================== @@ -490,6 +490,9 @@ void startIOManager(void) #endif #if defined(IOMGR_ENABLED_WINIO) case IO_MANAGER_WINIO: + /* Initialize console Codepage. */ + initConsoleCP(); + /* The WinIO I/O manager sadly has two implementations of this * startup, depending on the threading mode. * TODO: rationalise this into one entry point, that internally @@ -606,6 +609,7 @@ exitIOManager(bool wait_threads) #if defined(IOMGR_ENABLED_WINIO) case IO_MANAGER_WINIO: shutdownAsyncWinIO(wait_threads); + hs_restoreConsoleCP(); break; #endif #if defined(IOMGR_ENABLED_WIN32_LEGACY) @@ -1076,21 +1080,5 @@ static void insertIntoSleepingQueue(CapIOManager *iomgr, StgTSO *tso, LowResTime } #endif -/* Temporary compat helper function used in the Win32 I/O managers. - * TODO: replace by consulting the iomgr_type global instead. - */ -bool is_io_mng_native_p (void) -{ - switch (iomgr_type) { -#if defined(IOMGR_ENABLED_WINIO) - case IO_MANAGER_WINIO: - return true; -#endif - default: - return false; - } -} - - /* See comment above with the #pragma GCC diagnostic push */ #pragma GCC diagnostic pop ===================================== rts/IOManager.h ===================================== @@ -285,11 +285,6 @@ parseIOManagerFlag(const char *iomgrstr, IO_MANAGER_FLAG *flag); char * showIOManager(void); -/* Temporary compat helper function used in the Win32 I/O managers. - * TODO: replace by consulting the iomgr_type global instead. - */ -bool is_io_mng_native_p (void); - /* Values for StgAsyncIOOp.operation. * * Note: this is encoded in 6 bits in StgAsyncIOOp. ===================================== rts/RtsStartup.c ===================================== @@ -338,12 +338,6 @@ hs_init_ghc(int *argc, char **argv[], RtsConfig rts_config) /* Set the supported level of vector registers */ setVectorSupport(); - /* Initialize console Codepage. */ -#if defined(mingw32_HOST_OS) - if (is_io_mng_native_p()) - initConsoleCP(); -#endif - /* Initialise the adjustors subsystem */ initAdjustors(); @@ -613,11 +607,7 @@ hs_exit_(bool wait_foreign) exitIOManager(wait_foreign); - /* Restore the console Codepage. */ #if defined(mingw32_HOST_OS) - if (is_io_mng_native_p()) - hs_restoreConsoleCP(); - /* Disable console signal handlers, we're going down!. */ finiUserSignals (); #endif ===================================== rts/win32/AwaitEvent.c ===================================== @@ -36,13 +36,14 @@ awaitCompletedTimeoutsOrIOWin32(Capability *cap, bool wait) /* Try to de-queue completed IO requests */ workerWaitingForRequests = true; - if (is_io_mng_native_p()) - awaitAsyncRequests(wait); - /* FIXME: no support yet for interrupting in WinIO I/O manager - * See issue #27403 - */ - else - interrupt = !awaitRequests(wait); + if (iomgr_type == IO_MANAGER_WINIO) { + awaitAsyncRequests(wait); + /* FIXME: no support yet for interrupting in WinIO I/O manager + * See issue #27403 + */ + } else { + interrupt = !awaitRequests(wait); + } workerWaitingForRequests = false; // If a signal was raised, we need to service it ===================================== rts/win32/ThrIOManager.c ===================================== @@ -115,7 +115,7 @@ sendIOManagerEvent (HsWord32 event) void interruptIOManagerEvent (void) { - if (is_io_mng_native_p ()) { + if (iomgr_type == IO_MANAGER_WINIO) { OS_ACQUIRE_LOCK(&event_buf_mutex); /* How expensive is this??. */ View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/02d23436c6c7246a47c72349c7d79265... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/02d23436c6c7246a47c72349c7d79265... You're receiving this email because of your account on gitlab.haskell.org. Manage all notifications: https://gitlab.haskell.org/-/profile/notifications | Help: https://gitlab.haskell.org/help
participants (1)
-
Duncan Coutts (@dcoutts)