summaryrefslogtreecommitdiff
path: root/rts/posix/Signals.c
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2022-11-11 17:59:12 -0500
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-12-16 16:12:45 -0500
commit7ca683e44f9f7a9a7984bbed4f49712838638fc8 (patch)
tree8824b7a97d4ecdee78788398af1f742076d699f4 /rts/posix/Signals.c
parente0affaa9fc3e6dc0e65808afa383426b7fe9420a (diff)
downloadhaskell-7ca683e44f9f7a9a7984bbed4f49712838638fc8.tar.gz
rts: Encapsulate sched_state
Diffstat (limited to 'rts/posix/Signals.c')
-rw-r--r--rts/posix/Signals.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/rts/posix/Signals.c b/rts/posix/Signals.c
index 0d252d56b2..1d96fcfdf5 100644
--- a/rts/posix/Signals.c
+++ b/rts/posix/Signals.c
@@ -350,7 +350,7 @@ anyUserHandlers(void)
void
awaitUserSignals(void)
{
- while (!signals_pending() && sched_state == SCHED_RUNNING) {
+ while (!signals_pending() && getSchedState() == SCHED_RUNNING) {
pause();
}
}
@@ -521,7 +521,7 @@ shutdown_handler(int sig STG_UNUSED)
// If we're already trying to interrupt the RTS, terminate with
// extreme prejudice. So the first ^C tries to exit the program
// cleanly, and the second one just kills it.
- if (sched_state >= SCHED_INTERRUPTING) {
+ if (getSchedState() >= SCHED_INTERRUPTING) {
stg_exit(EXIT_INTERRUPTED);
} else {
interruptStgRts();