summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2019-09-30 00:08:48 +0000
committerBen Gamari <ben@well-typed.com>2020-12-01 12:48:54 -0500
commitc6855d59cebda52424be0257e24bfe20c6eead56 (patch)
tree893429ee1cac38382b122b6e2fb867f33523a095
parent2e3a9399fb2f0eea907bd3e6baf6c74fcc33b6cd (diff)
downloadhaskell-c6855d59cebda52424be0257e24bfe20c6eead56.tar.gz
rts: Use RELEASE ordering in unlockClosure
-rw-r--r--rts/SMPClosureOps.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/rts/SMPClosureOps.h b/rts/SMPClosureOps.h
index c73821a782..3191a8c600 100644
--- a/rts/SMPClosureOps.h
+++ b/rts/SMPClosureOps.h
@@ -119,9 +119,8 @@ tryLockClosure(StgClosure *p)
EXTERN_INLINE void unlockClosure(StgClosure *p, const StgInfoTable *info)
{
- // This is a strictly ordered write, so we need a write_barrier():
- write_barrier();
- p->header.info = info;
+ // This is a strictly ordered write, so we need a RELEASE ordering.
+ RELEASE_STORE(&p->header.info, info);
}
#endif /* CMINUSMINUS */