summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2020-10-24 11:02:46 -0400
committerBen Gamari <ben@smart-cactus.org>2020-10-24 20:59:39 -0400
commitbf1b0bc78da7dbe5f6fbda54b37a9cb165ff857f (patch)
treeba31e45138a2d8f41720cb4aa1accd9772b554ee /includes
parentd584923a1e1fe92a4bb38b2cd1f0bf5a3b7802f0 (diff)
downloadhaskell-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.h10
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) \