summaryrefslogtreecommitdiff
path: root/rts/Capability.c
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2019-09-27 01:50:37 +0000
committerBen Gamari <ben@smart-cactus.org>2020-10-24 21:00:37 -0400
commitf88710185acc0e02b334b96004f4b8fae38c5eb9 (patch)
tree72e5e494575f6c9b23ba64553ec3bed7f4cc94ad /rts/Capability.c
parent8d2b3c3d1fcb9009b6dfcce85777e04bcec9d219 (diff)
downloadhaskell-f88710185acc0e02b334b96004f4b8fae38c5eb9.tar.gz
rts/Schedule: Eliminate data races on recent_activity
We cannot safely use relaxed atomics here.
Diffstat (limited to 'rts/Capability.c')
-rw-r--r--rts/Capability.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/rts/Capability.c b/rts/Capability.c
index 5ebe6c8b46..3031d283c4 100644
--- a/rts/Capability.c
+++ b/rts/Capability.c
@@ -85,7 +85,7 @@ STATIC_INLINE bool
globalWorkToDo (void)
{
return RELAXED_LOAD(&sched_state) >= SCHED_INTERRUPTING
- || recent_activity == ACTIVITY_INACTIVE; // need to check for deadlock
+ || RELAXED_LOAD(&recent_activity) == ACTIVITY_INACTIVE; // need to check for deadlock
}
#endif