summaryrefslogtreecommitdiff
path: root/rts
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2019-09-30 00:08:48 +0000
committerBen Gamari <ben@smart-cactus.org>2020-10-30 00:41:14 -0400
commitd0bc05178ba8a36a8c18158a488471d15fbf97d1 (patch)
tree5406d01ded64dcbe2c1f7aa33c025624fc32b84c /rts
parentaad1f803471fff1f187b0a0784dc38a867379847 (diff)
downloadhaskell-d0bc05178ba8a36a8c18158a488471d15fbf97d1.tar.gz
rts: Use RELEASE ordering in unlockClosure
Diffstat (limited to 'rts')
-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 */