diff options
author | Ben Gamari <ben@smart-cactus.org> | 2021-07-16 10:21:24 -0400 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-12-16 16:12:44 -0500 |
commit | fbc842441fbd6ca2065b4e28af98197765350a73 (patch) | |
tree | ad9c3475ab0f5327bcc69fb48b987b89f0a3d769 /rts | |
parent | 914f002513752227149ce63e81f121bfee862cac (diff) | |
download | haskell-fbc842441fbd6ca2065b4e28af98197765350a73.tar.gz |
Introduce SET_INFO_RELEASE for Cmm
Diffstat (limited to 'rts')
-rw-r--r-- | rts/Apply.cmm | 3 | ||||
-rw-r--r-- | rts/Updates.h | 3 | ||||
-rw-r--r-- | rts/include/Cmm.h | 1 |
3 files changed, 3 insertions, 4 deletions
diff --git a/rts/Apply.cmm b/rts/Apply.cmm index 9b1e7f72e8..b338b4c387 100644 --- a/rts/Apply.cmm +++ b/rts/Apply.cmm @@ -694,8 +694,7 @@ INFO_TABLE(stg_AP_STACK,/*special layout*/0,0,AP_STACK,"AP_STACK","AP_STACK") // Can't add StgInd_indirectee(ap) to UpdRemSet here because the old value is // not reachable. StgInd_indirectee(ap) = CurrentTSO; - prim_write_barrier; - SET_INFO(ap, __stg_EAGER_BLACKHOLE_info); + SET_INFO_RELEASE(ap, __stg_EAGER_BLACKHOLE_info); /* ensure there is at least AP_STACK_SPLIM words of headroom available * after unpacking the AP_STACK. See bug #1466 */ diff --git a/rts/Updates.h b/rts/Updates.h index f2ca437dfc..81ddca2684 100644 --- a/rts/Updates.h +++ b/rts/Updates.h @@ -61,8 +61,7 @@ } \ OVERWRITING_CLOSURE(p1); \ StgInd_indirectee(p1) = p2; \ - prim_write_barrier; \ - SET_INFO(p1, stg_BLACKHOLE_info); \ + SET_INFO_RELEASE(p1, stg_BLACKHOLE_info); \ LDV_RECORD_CREATE(p1); \ and_then; diff --git a/rts/include/Cmm.h b/rts/include/Cmm.h index 932bfb903a..f688a68e4d 100644 --- a/rts/include/Cmm.h +++ b/rts/include/Cmm.h @@ -594,6 +594,7 @@ /* Getting/setting the info pointer of a closure */ #define SET_INFO(p,info) StgHeader_info(p) = info +#define SET_INFO_RELEASE(p,info) prim_write_barrier; StgHeader_info(p) = info #define GET_INFO(p) StgHeader_info(p) /* Determine the size of an ordinary closure from its info table */ |