Duncan Coutts pushed to branch wip/io-manager-deadlock-detection at Glasgow Haskell Compiler / GHC
Commits:
-
3930cb47
by Duncan Coutts at 2026-09-30T12:37:36+01:00
-
04c39112
by Duncan Coutts at 2026-09-30T12:37:55+01:00
4 changed files:
Changes:
| ... | ... | @@ -478,7 +478,7 @@ bool awaitCompletedTimeoutsOrIOPoll(CapIOManager *iomgr) |
| 478 | 478 | * (see handleIdleGcTimeout below).
|
| 479 | 479 | */
|
| 480 | 480 | bool any_pending_io = nfds > 0;
|
| 481 | - int timeout_idlegc_delay;
|
|
| 481 | + bool timeout_idlegc_delay;
|
|
| 482 | 482 | adjustTimeoutForIdleGc(any_pending_io, &timeout, &timeout_idlegc_delay);
|
| 483 | 483 | #endif
|
| 484 | 484 |
| ... | ... | @@ -371,7 +371,7 @@ awaitCompletedTimeoutsOrIOSelect(CapIOManager *iomgr, bool wait) |
| 371 | 371 | * (see handleIdleGcTimeout below).
|
| 372 | 372 | */
|
| 373 | 373 | bool any_pending_io = maxfd > 0;
|
| 374 | - int timeout_idlegc_delay;
|
|
| 374 | + bool timeout_idlegc_delay;
|
|
| 375 | 375 | adjustTimeoutForIdleGc(any_pending_io, &timeout, &timeout_idlegc_delay);
|
| 376 | 376 | #endif
|
| 377 | 377 |
| ... | ... | @@ -442,7 +442,7 @@ bool awaitCompletedTimeoutsOrIOSelectBis(CapIOManager *iomgr) |
| 442 | 442 | * (see handleIdleGcTimeout below).
|
| 443 | 443 | */
|
| 444 | 444 | bool any_pending_io = maxfd >= 0;
|
| 445 | - int timeout_idlegc_delay;
|
|
| 445 | + bool timeout_idlegc_delay;
|
|
| 446 | 446 | adjustTimeoutForIdleGc(any_pending_io, &timeout, &timeout_idlegc_delay);
|
| 447 | 447 | #endif
|
| 448 | 448 |
| ... | ... | @@ -55,8 +55,6 @@ HsInt nocldstop = 0; |
| 55 | 55 | StgInt *signal_handlers = NULL; /* Dynamically grown array of signal handlers */
|
| 56 | 56 | static StgInt nHandlers = 0; /* Size of handlers array */
|
| 57 | 57 | |
| 58 | -static uint32_t n_haskell_handlers = 0;
|
|
| 59 | - |
|
| 60 | 58 | static sigset_t userSignals;
|
| 61 | 59 | static sigset_t savedSignals;
|
| 62 | 60 | |
| ... | ... | @@ -83,7 +81,6 @@ freeSignalHandlers(void) { |
| 83 | 81 | stgFree(signal_handlers);
|
| 84 | 82 | signal_handlers = NULL;
|
| 85 | 83 | nHandlers = 0;
|
| 86 | - n_haskell_handlers = 0;
|
|
| 87 | 84 | }
|
| 88 | 85 | #if defined(THREADED_RTS)
|
| 89 | 86 | closeMutex(&sig_mutex);
|
| ... | ... | @@ -288,16 +285,10 @@ stg_sig_install(int sig, int spi, void *mask) |
| 288 | 285 | case STG_SIG_RST:
|
| 289 | 286 | case STG_SIG_HAN:
|
| 290 | 287 | sigaddset(&userSignals, sig);
|
| 291 | - if (previous_spi != STG_SIG_HAN && previous_spi != STG_SIG_RST) {
|
|
| 292 | - n_haskell_handlers++;
|
|
| 293 | - }
|
|
| 294 | 288 | break;
|
| 295 | 289 | |
| 296 | 290 | default:
|
| 297 | 291 | sigdelset(&userSignals, sig);
|
| 298 | - if (previous_spi == STG_SIG_HAN || previous_spi == STG_SIG_RST) {
|
|
| 299 | - n_haskell_handlers--;
|
|
| 300 | - }
|
|
| 301 | 292 | break;
|
| 302 | 293 | }
|
| 303 | 294 |