diff options
author | Ben Gamari <ben@smart-cactus.org> | 2021-01-01 20:56:02 -0500 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-01-09 21:21:37 -0500 |
commit | 83ac5594d101440f72dc0ead97f0d1583056c07d (patch) | |
tree | eefd71c530bab1cd245c13dadf9bffd6dbc13729 /rts/hooks/LongGCSync.c | |
parent | 3d15d8d008307a19314c23eeb65b8ead448f0b37 (diff) | |
download | haskell-83ac5594d101440f72dc0ead97f0d1583056c07d.tar.gz |
rts: Use SEQ_CST accesses when touching `wakeup`
These are the two remaining non-atomic accesses to `wakeup` which were
missed by the original TSAN patch.
Diffstat (limited to 'rts/hooks/LongGCSync.c')
-rw-r--r-- | rts/hooks/LongGCSync.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/rts/hooks/LongGCSync.c b/rts/hooks/LongGCSync.c index 351406df98..58ee52fa3d 100644 --- a/rts/hooks/LongGCSync.c +++ b/rts/hooks/LongGCSync.c @@ -21,7 +21,7 @@ void LongGCSync (uint32_t me USED_IF_THREADS, Time t STG_UNUSED) { uint32_t i; for (i=0; i < n_capabilities; i++) { - if (i != me && gc_threads[i]->wakeup != GC_THREAD_STANDING_BY) { + if (i != me && SEQ_CST_LOAD(&gc_threads[i]->wakeup) == GC_THREAD_STANDING_BY) { debugBelch("Warning: slow GC sync: still waiting for cap %d\n", i); } |