summaryrefslogtreecommitdiff
path: root/rts
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2021-07-16 12:28:20 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-12-16 16:12:44 -0500
commit914f002513752227149ce63e81f121bfee862cac (patch)
tree9aa5506a3b3ebceb24dd8486aaa27c48b8d86aa6 /rts
parent7356f8e043018678490a0721ff27e0d834e0fa7f (diff)
downloadhaskell-914f002513752227149ce63e81f121bfee862cac.tar.gz
eventlog: Silence spurious data race
Diffstat (limited to 'rts')
-rw-r--r--rts/eventlog/EventLog.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/rts/eventlog/EventLog.c b/rts/eventlog/EventLog.c
index dfa9ecc0fb..30ffe9cf04 100644
--- a/rts/eventlog/EventLog.c
+++ b/rts/eventlog/EventLog.c
@@ -382,7 +382,9 @@ initEventLogging()
enum EventLogStatus
eventLogStatus(void)
{
- if (eventlog_enabled) {
+ /* This relaxed load is needed as the eventLogStatus is called from
+ * handleTick without holding the eventlog state mutex. */
+ if (RELAXED_LOAD(&eventlog_enabled)) {
return EVENTLOG_RUNNING;
} else {
return EVENTLOG_NOT_CONFIGURED;