diff options
author | Ben Gamari <ben@smart-cactus.org> | 2021-07-16 12:28:20 -0400 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-12-16 16:12:44 -0500 |
commit | 914f002513752227149ce63e81f121bfee862cac (patch) | |
tree | 9aa5506a3b3ebceb24dd8486aaa27c48b8d86aa6 /rts | |
parent | 7356f8e043018678490a0721ff27e0d834e0fa7f (diff) | |
download | haskell-914f002513752227149ce63e81f121bfee862cac.tar.gz |
eventlog: Silence spurious data race
Diffstat (limited to 'rts')
-rw-r--r-- | rts/eventlog/EventLog.c | 4 |
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; |