diff options
author | Ben Gamari <ben@smart-cactus.org> | 2020-10-24 11:02:46 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2020-10-24 20:59:39 -0400 |
commit | bf1b0bc78da7dbe5f6fbda54b37a9cb165ff857f (patch) | |
tree | ba31e45138a2d8f41720cb4aa1accd9772b554ee /includes | |
parent | d584923a1e1fe92a4bb38b2cd1f0bf5a3b7802f0 (diff) | |
download | haskell-bf1b0bc78da7dbe5f6fbda54b37a9cb165ff857f.tar.gz |
rts: Introduce SET_HDR_RELEASEwip/tsan/prep
Also ensure that we also store the info table pointer last to ensure
that the synchronization covers all stores.
Diffstat (limited to 'includes')
-rw-r--r-- | includes/rts/storage/ClosureMacros.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/includes/rts/storage/ClosureMacros.h b/includes/rts/storage/ClosureMacros.h index 89d5cd1d0e..5674322bd2 100644 --- a/includes/rts/storage/ClosureMacros.h +++ b/includes/rts/storage/ClosureMacros.h @@ -140,13 +140,19 @@ INLINE_HEADER StgHalfWord GET_TAG(const StgClosure *con) #define SET_HDR(c,_info,ccs) \ { \ + SET_PROF_HDR((StgClosure *)(c),ccs); \ RELAXED_STORE(&(c)->header.info, _info); \ + } + +#define SET_HDR_RELEASE(c,_info,ccs) \ + { \ SET_PROF_HDR((StgClosure *)(c),ccs); \ + RELEASE_STORE(&(c)->header.info, _info); \ } #define SET_ARR_HDR(c,info,costCentreStack,n_bytes) \ - SET_HDR(c,info,costCentreStack); \ - (c)->bytes = n_bytes; + (c)->bytes = n_bytes; \ + SET_HDR(c,info,costCentreStack); // Use when changing a closure from one kind to another #define OVERWRITE_INFO(c, new_info) \ |