[Git][ghc/ghc][wip/dcoutts/io-manager-tidy] Potential fix for !HAVE_PREEMPTION case
Duncan Coutts pushed to branch wip/dcoutts/io-manager-tidy at Glasgow Haskell Compiler / GHC Commits: e9acc506 by Duncan Coutts at 2026-07-15T23:58:35+01:00 Potential fix for !HAVE_PREEMPTION case hopefully fixes the wasm build. If so, squash into previous patch. - - - - - 1 changed file: - rts/posix/Poll.c Changes: ===================================== rts/posix/Poll.c ===================================== @@ -414,13 +414,13 @@ void pollCompletedTimeoutsOrIOPoll(CapIOManager *iomgr) if (!isEmptyClosureTable(&iomgr->aiop_table)) { - nfds_t nfds = sizeClosureTable(&iomgr->aiop_table) + 1; - #if defined(HAVE_PREEMPTION) /* the full_poll_table includes interrupt_fd_r */ + nfds_t nfds = sizeClosureTable(&iomgr->aiop_table) + 1; struct pollfd *poll_table = iomgr->full_poll_table; #else /* the aiop_poll_table does not include interrupt_fd_r */ + nfds_t nfds = sizeClosureTable(&iomgr->aiop_table) + 0; struct pollfd *poll_table = iomgr->aiop_poll_table; #endif @@ -490,9 +490,11 @@ bool awaitCompletedTimeoutsOrIOPoll(CapIOManager *iomgr) #if defined(HAVE_PREEMPTION) /* the full_poll_table includes interrupt_fd_r */ + nfds_t nfds = sizeClosureTable(&iomgr->aiop_table) + 1; struct pollfd *poll_table = iomgr->full_poll_table; #else /* the aiop_poll_table does not include interrupt_fd_r */ + nfds_t nfds = sizeClosureTable(&iomgr->aiop_table) + 0; struct pollfd *poll_table = iomgr->aiop_poll_table; #endif @@ -507,7 +509,6 @@ bool awaitCompletedTimeoutsOrIOPoll(CapIOManager *iomgr) #endif /* Check for I/O readiness, possibly waiting. */ - nfds_t nfds = sizeClosureTable(&iomgr->aiop_table) + 1; #if defined(HAVE_DECL_PPOLL) && HAVE_DECL_PPOLL == 1 int res = ppoll(poll_table, nfds, timeout_ns, NULL); View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/e9acc5068cb01cb7a80be6de143ee63b... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/e9acc5068cb01cb7a80be6de143ee63b... 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)