Duncan Coutts pushed to branch wip/dcoutts/io-manager-tidy at Glasgow Haskell Compiler / GHC Commits: 1fb92614 by Duncan Coutts at 2026-06-18T23:54:29+01:00 FIXUP Add interruptIOManager support for win32 legacy I/O manager - - - - - c98f8fdb by Duncan Coutts at 2026-06-18T23:55:21+01:00 FIXUP Remove wakeupIOManager, ioManagerWakeup and setIOManagerWakeupFd - - - - - 4 changed files: - libraries/ghc-internal/src/GHC/Internal/Event/Control.hs - libraries/ghc-internal/src/GHC/Internal/Event/Manager.hs - libraries/ghc-internal/src/GHC/Internal/Event/TimerManager.hs - rts/win32/AsyncMIO.h Changes: ===================================== libraries/ghc-internal/src/GHC/Internal/Event/Control.hs ===================================== @@ -39,7 +39,7 @@ import GHC.Internal.Show (Show) import GHC.Internal.Types (Bool(..), Int, IO) import GHC.Internal.Word (Word8) import GHC.Internal.Foreign.C.Error (throwErrnoIfMinus1_, throwErrno, getErrno) -import GHC.Internal.Foreign.C.Types (CInt(..), CSize(..)) +import GHC.Internal.Foreign.C.Types (CSize(..)) import GHC.Internal.Foreign.ForeignPtr (ForeignPtr, mallocForeignPtrBytes, withForeignPtr) import GHC.Internal.Foreign.Marshal.Alloc (alloca, allocaBytes) import GHC.Internal.Foreign.Marshal.Array (allocaArray) @@ -94,8 +94,8 @@ wakeupReadFd = controlEventFd -- | Create the structure (usually a pipe) used for waking up the IO -- manager thread from another thread. -newControl :: Bool -> IO Control -newControl shouldRegister = allocaArray 2 $ \fds -> do +newControl :: IO Control +newControl = allocaArray 2 $ \fds -> do let createPipe = do throwErrnoIfMinus1_ "pipe" $ c_pipe fds rd <- peekElemOff fds 0 ===================================== libraries/ghc-internal/src/GHC/Internal/Event/Manager.hs ===================================== @@ -194,7 +194,7 @@ newWith :: Backend -> IO EventManager newWith be = do iofds <- fmap (listArray (0, callbackArraySize-1)) $ replicateM callbackArraySize (newMVar =<< IT.new 8) - ctrl <- newControl False + ctrl <- newControl state <- newIORef Created us <- newSource _ <- mkWeakIORef state $ do ===================================== libraries/ghc-internal/src/GHC/Internal/Event/TimerManager.hs ===================================== @@ -126,7 +126,7 @@ new = newWith =<< newDefaultBackend newWith :: Backend -> IO TimerManager newWith be = do timeouts <- newIORef Q.empty - ctrl <- newControl True + ctrl <- newControl state <- newIORef Created us <- newSource _ <- mkWeakIORef state $ do ===================================== rts/win32/AsyncMIO.h ===================================== @@ -25,7 +25,7 @@ extern unsigned int addDoProcRequest(void* proc, void* param); extern int startupAsyncIO(void); extern void shutdownAsyncIO(bool wait_threads); -extern int awaitRequests(bool wait); +extern bool awaitRequests(bool wait); extern void abandonRequestWait(void); extern void resetAbandonRequestWait(void); View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/8b105ca9f0a64891c04770fdf6cc7fa... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/8b105ca9f0a64891c04770fdf6cc7fa... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Duncan Coutts (@dcoutts)