diff options
author | Ben Gamari <ben@smart-cactus.org> | 2022-11-07 22:50:53 -0500 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-12-16 16:12:44 -0500 |
commit | 99269b9fd817262a686867383bf0fe88fdc64fb0 (patch) | |
tree | 3f2651fdf0f004cbd769d9b7e418e3e778aa78ef /rts/Capability.h | |
parent | 2228c999059f6bd10fb85476174180da2a7190da (diff) | |
download | haskell-99269b9fd817262a686867383bf0fe88fdc64fb0.tar.gz |
Improve heap memory barrier Note
Also introduce MUT_FIELD marker in Closures.h to document mutable
fields.
Diffstat (limited to 'rts/Capability.h')
-rw-r--r-- | rts/Capability.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/rts/Capability.h b/rts/Capability.h index 884d281fa2..168f8e565e 100644 --- a/rts/Capability.h +++ b/rts/Capability.h @@ -493,7 +493,8 @@ contextSwitchCapability (Capability *cap, bool immediately) INLINE_HEADER bool emptyInbox(Capability *cap) { - // This may race with writes to putMVars and inbox but this harmless for the + // See Note [Heap memory barriers], section "Barriers on Messages". + // This may race with writes to putMVars but this harmless for the // intended uses of this function. TSAN_ANNOTATE_BENIGN_RACE(&cap->putMVars, "emptyInbox(cap->putMVars)"); return (RELAXED_LOAD(&cap->inbox) == (Message*)END_TSO_QUEUE && |