diff options
author | Ben Gamari <ben@smart-cactus.org> | 2020-10-31 01:13:13 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2020-11-01 13:02:18 -0500 |
commit | 3a18155331e07e53b9f3b1d987ed430066b17aa4 (patch) | |
tree | ec002b0641296775a2b1f45903f5c88c55207357 /rts/sm | |
parent | ef25aaa107ae099a2a9bd80d3130664334c69482 (diff) | |
download | haskell-3a18155331e07e53b9f3b1d987ed430066b17aa4.tar.gz |
Strengthen ordering in releaseGCThreads
Diffstat (limited to 'rts/sm')
-rw-r--r-- | rts/sm/GC.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rts/sm/GC.c b/rts/sm/GC.c index d80c0e94c6..8a8acb1b53 100644 --- a/rts/sm/GC.c +++ b/rts/sm/GC.c @@ -1416,10 +1416,10 @@ releaseGCThreads (Capability *cap USED_IF_THREADS, bool idle_cap[]) uint32_t i; for (i=0; i < n_threads; i++) { if (i == me || idle_cap[i]) continue; - if (RELAXED_LOAD(&gc_threads[i]->wakeup) != GC_THREAD_WAITING_TO_CONTINUE) + if (SEQ_CST_LOAD(&gc_threads[i]->wakeup) != GC_THREAD_WAITING_TO_CONTINUE) barf("releaseGCThreads"); - RELAXED_STORE(&gc_threads[i]->wakeup, GC_THREAD_INACTIVE); + SEQ_CST_STORE(&gc_threads[i]->wakeup, GC_THREAD_INACTIVE); ACQUIRE_SPIN_LOCK(&gc_threads[i]->gc_spin); RELEASE_SPIN_LOCK(&gc_threads[i]->mut_spin); } |