summaryrefslogtreecommitdiff
path: root/rts/Updates.h
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2019-09-28 17:52:48 +0000
committerBen Gamari <ben@smart-cactus.org>2020-10-24 21:00:58 -0400
commit5c23bc4cd6936840deeb398bbea06165952f17c2 (patch)
treefdbccd4737dd1a0baf8fc22050c71a0afadfda7b /rts/Updates.h
parent316add6762aca4a01fbe71d264b0c65c11313929 (diff)
downloadhaskell-5c23bc4cd6936840deeb398bbea06165952f17c2.tar.gz
rts/Updates: Use proper atomic operations
Diffstat (limited to 'rts/Updates.h')
-rw-r--r--rts/Updates.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/rts/Updates.h b/rts/Updates.h
index 608aaff524..aa5fbe0133 100644
--- a/rts/Updates.h
+++ b/rts/Updates.h
@@ -76,7 +76,6 @@ INLINE_HEADER void updateWithIndirection (Capability *cap,
/* not necessarily true: ASSERT( !closure_IND(p1) ); */
/* occurs in RaiseAsync.c:raiseAsync() */
/* See Note [Heap memory barriers] in SMP.h */
- write_barrier();
bdescr *bd = Bdescr((StgPtr)p1);
if (bd->gen_no != 0) {
IF_NONMOVING_WRITE_BARRIER_ENABLED {
@@ -88,9 +87,8 @@ INLINE_HEADER void updateWithIndirection (Capability *cap,
TICK_UPD_NEW_IND();
}
OVERWRITING_CLOSURE(p1);
- ((StgInd *)p1)->indirectee = p2;
- write_barrier();
- SET_INFO(p1, &stg_BLACKHOLE_info);
+ RELEASE_STORE(&((StgInd *)p1)->indirectee, p2);
+ SET_INFO_RELEASE(p1, &stg_BLACKHOLE_info);
LDV_RECORD_CREATE(p1);
}