summaryrefslogtreecommitdiff
path: root/rts/win32
diff options
context:
space:
mode:
authorDuncan Coutts <duncan@well-typed.com>2020-12-29 23:42:14 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-11-22 02:06:17 -0500
commit054dcc9ddf6ff01245d356d6d87ad97fec30f47d (patch)
tree498758af190bc6d523e837621fba7600912d76ad /rts/win32
parent9943baf9b76374cb2eef53671a52fefbaed1cbce (diff)
downloadhaskell-054dcc9ddf6ff01245d356d6d87ad97fec30f47d.tar.gz
Pass the Capability *cap explicitly to awaitEvent
It is currently only used in the non-threaded RTS so it works to use MainCapability, but it's a bit nicer to pass the cap anyway. It's certainly shorter.
Diffstat (limited to 'rts/win32')
-rw-r--r--rts/win32/AwaitEvent.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/rts/win32/AwaitEvent.c b/rts/win32/AwaitEvent.c
index a8bb3cd191..6ddd2103c0 100644
--- a/rts/win32/AwaitEvent.c
+++ b/rts/win32/AwaitEvent.c
@@ -28,7 +28,7 @@
static bool workerWaitingForRequests = false;
void
-awaitEvent(bool wait)
+awaitEvent(Capability *cap, bool wait)
{
do {
/* Try to de-queue completed IO requests
@@ -45,7 +45,7 @@ awaitEvent(bool wait)
// startSignalHandlers(), but this is the way that posix/Select.c
// does it and I'm feeling too paranoid to refactor it today --SDM
if (stg_pending_events != 0) {
- startSignalHandlers(&MainCapability);
+ startSignalHandlers(cap);
return;
}
@@ -57,7 +57,7 @@ awaitEvent(bool wait)
} while (wait
&& sched_state == SCHED_RUNNING
- && emptyRunQueue(&MainCapability)
+ && emptyRunQueue(cap)
);
}
#endif