diff options
| author | Ben Gamari <ben@smart-cactus.org> | 2020-10-31 01:13:13 -0400 |
|---|---|---|
| committer | Ben Gamari <ben@well-typed.com> | 2020-12-01 12:48:54 -0500 |
| commit | dddd97ec54ee2e3080be8eed0c87fcae9b64020f (patch) | |
| tree | 8607de9b0d5f23b15cf87d5f80a3424322e368f4 | |
| parent | 48054cf25b3880325f1d4c9c2859350741b53daa (diff) | |
| download | haskell-dddd97ec54ee2e3080be8eed0c87fcae9b64020f.tar.gz | |
Strengthen ordering in releaseGCThreads
| -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 6d9a3e64d7..6c947f06a9 100644 --- a/rts/sm/GC.c +++ b/rts/sm/GC.c @@ -1438,10 +1438,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); } |
