Duncan Coutts pushed to branch wip/dcoutts/io-manager-io-primop-exceptions at Glasgow Haskell Compiler / GHC Commits: 3d73b7a6 by Duncan Coutts at 2026-08-28T17:56:38+01:00 FIXUP Change the encoding of results from the I/O manager to I/O primops - - - - - 1 changed file: - rts/PrimOps.cmm Changes: ===================================== rts/PrimOps.cmm ===================================== @@ -2314,22 +2314,22 @@ stg_waitReadyFd ( W_ fd, CInt rw ) (result) = ccall syncIOWaitReady(Capability_iomgr(MyCapability()) "ptr", CurrentTSO "ptr", rw, fd); - /* See Note [Encoding of I/O manager operation results to primops] */ + /* See Note [Encoding of result of I/O manager operations] */ /* case IOSubmitResultAsyncContinue */ - if (result == 0) (likely: True) { + if (result == 0::CInt) (likely: True) { /* See Note [Thread blocking for new I/O primops] */ jump stg_block_io_unit(); } /* case IOSubmitResultSyncSuccess*/ - if (result == 1) { + if (result == 1::CInt) { /* Success, don't even go via scheduler. */ return (); } /* negative numbers are -errno error codes */ - if (result < 0) { + if (result < 0::CInt) { /* See Note [Calling convention for raisePrimIOException] */ W_ dummyR1; W_ errno; dummyR1 = 0; @@ -2339,7 +2339,7 @@ stg_waitReadyFd ( W_ fd, CInt rw ) } /* case IOSubmitResultHeapOverflow */ - if (result == 2) { + if (result == 2::CInt) { jump stg_raisezh(HsIface_heapOverflow_closure(W_[ghc_hs_iface])); } View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/3d73b7a66c8d02181a8231be945d61cb... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/3d73b7a66c8d02181a8231be945d61cb... 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