Duncan Coutts pushed to branch wip/io-manager-deadlock-detection at Glasgow Haskell Compiler / GHC
Commits:
-
ecf70089
by Duncan Coutts at 2026-02-12T22:53:53+00:00
-
d4fa6e0e
by Duncan Coutts at 2026-02-12T22:54:21+00:00
-
731729ec
by Duncan Coutts at 2026-02-12T22:55:07+00:00
-
0810b12f
by Duncan Coutts at 2026-02-12T22:58:13+00:00
5 changed files:
Changes:
| ... | ... | @@ -269,6 +269,8 @@ void initCapabilityIOManager(CapIOManager *iomgr); |
| 269 | 269 | */
|
| 270 | 270 | void freeCapabilityIOManager(CapIOManager *iomgr, bool after_fork);
|
| 271 | 271 | |
| 272 | +// FIXME: turns out we do not need the bool after_fork. Simplify and rebase.
|
|
| 273 | + |
|
| 272 | 274 | /* CapIOManager life cycle:
|
| 273 | 275 | *
|
| 274 | 276 | * alloc -> init -> free -> free struct (!after_fork)
|
| ... | ... | @@ -22,10 +22,6 @@ |
| 22 | 22 | # include <errno.h>
|
| 23 | 23 | #endif
|
| 24 | 24 | |
| 25 | -#if defined(HAVE_EVENTFD_H)
|
|
| 26 | -# include <sys/eventfd.h>
|
|
| 27 | -#endif
|
|
| 28 | - |
|
| 29 | 25 | #include <stdlib.h>
|
| 30 | 26 | #include <unistd.h>
|
| 31 | 27 |
| ... | ... | @@ -158,9 +158,7 @@ void initCapabilityIOManagerPoll(CapIOManager *iomgr) |
| 158 | 158 | void freeCapabilityIOManagerPoll(CapIOManager *iomgr, bool after_fork)
|
| 159 | 159 | {
|
| 160 | 160 | stgFree(iomgr->full_poll_table);
|
| 161 | - if (!after_fork) {
|
|
| 162 | - closeFdWakeup(iomgr->wakeup_fd_r, iomgr->wakeup_fd_w);
|
|
| 163 | - }
|
|
| 161 | + closeFdWakeup(iomgr->wakeup_fd_r, iomgr->wakeup_fd_w);
|
|
| 164 | 162 | }
|
| 165 | 163 | |
| 166 | 164 |
| ... | ... | @@ -66,9 +66,7 @@ void initCapabilityIOManagerSelect(CapIOManager *iomgr) |
| 66 | 66 | |
| 67 | 67 | void freeCapabilityIOManagerSelect(CapIOManager *iomgr, bool after_fork)
|
| 68 | 68 | {
|
| 69 | - if (!after_fork) {
|
|
| 70 | - closeFdWakeup(iomgr->wakeup_fd_r, iomgr->wakeup_fd_w);
|
|
| 71 | - }
|
|
| 69 | + closeFdWakeup(iomgr->wakeup_fd_r, iomgr->wakeup_fd_w);
|
|
| 72 | 70 | }
|
| 73 | 71 | |
| 74 | 72 | void wakeupIOManagerSelect(CapIOManager *iomgr)
|
| ... | ... | @@ -37,10 +37,6 @@ |
| 37 | 37 | # include <errno.h>
|
| 38 | 38 | #endif
|
| 39 | 39 | |
| 40 | -#if defined(HAVE_EVENTFD_H)
|
|
| 41 | -# include <sys/eventfd.h>
|
|
| 42 | -#endif
|
|
| 43 | - |
|
| 44 | 40 | #if defined(HAVE_TERMIOS_H)
|
| 45 | 41 | #include <termios.h>
|
| 46 | 42 | #endif
|