diff options
author | Ben Gamari <ben@smart-cactus.org> | 2022-11-11 17:59:12 -0500 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-12-16 16:12:45 -0500 |
commit | 7ca683e44f9f7a9a7984bbed4f49712838638fc8 (patch) | |
tree | 8824b7a97d4ecdee78788398af1f742076d699f4 /rts/win32 | |
parent | e0affaa9fc3e6dc0e65808afa383426b7fe9420a (diff) | |
download | haskell-7ca683e44f9f7a9a7984bbed4f49712838638fc8.tar.gz |
rts: Encapsulate sched_state
Diffstat (limited to 'rts/win32')
-rw-r--r-- | rts/win32/AsyncMIO.c | 2 | ||||
-rw-r--r-- | rts/win32/AwaitEvent.c | 2 | ||||
-rw-r--r-- | rts/win32/ConsoleHandler.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/rts/win32/AsyncMIO.c b/rts/win32/AsyncMIO.c index 65204bd416..00d1638d63 100644 --- a/rts/win32/AsyncMIO.c +++ b/rts/win32/AsyncMIO.c @@ -247,7 +247,7 @@ start: if (completed_hw == 0) { // empty table, drop lock and wait OS_RELEASE_LOCK(&queue_lock); - if ( wait && sched_state == SCHED_RUNNING ) { + if ( wait && getSchedState() == SCHED_RUNNING ) { DWORD dwRes = WaitForMultipleObjects(2, wait_handles, FALSE, INFINITE); switch (dwRes) { diff --git a/rts/win32/AwaitEvent.c b/rts/win32/AwaitEvent.c index 6ddd2103c0..fbe037c2a2 100644 --- a/rts/win32/AwaitEvent.c +++ b/rts/win32/AwaitEvent.c @@ -56,7 +56,7 @@ awaitEvent(Capability *cap, bool wait) // - the run-queue is now non- empty } while (wait - && sched_state == SCHED_RUNNING + && getSchedState() == SCHED_RUNNING && emptyRunQueue(cap) ); } diff --git a/rts/win32/ConsoleHandler.c b/rts/win32/ConsoleHandler.c index 194a659a8d..a7940a60c0 100644 --- a/rts/win32/ConsoleHandler.c +++ b/rts/win32/ConsoleHandler.c @@ -91,7 +91,7 @@ static BOOL WINAPI shutdown_handler(DWORD dwCtrlType) // 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(); |