diff options
| author | Ben Gamari <ben@smart-cactus.org> | 2019-09-28 17:52:48 +0000 |
|---|---|---|
| committer | Ben Gamari <ben@well-typed.com> | 2020-12-01 12:48:54 -0500 |
| commit | 7d4d0751d6276f6e810d3cf4828da876b197c095 (patch) | |
| tree | befdbee011c5d3064435cbd6f1aec15ad873dd4c | |
| parent | a191f6d5e59716e9027b77c37689bcfc035a5a0a (diff) | |
| download | haskell-7d4d0751d6276f6e810d3cf4828da876b197c095.tar.gz | |
rts/Updates: Use proper atomic operations
| -rw-r--r-- | rts/Updates.h | 6 |
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); } |
