summaryrefslogtreecommitdiff
path: root/includes/Cmm.h
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2019-05-19 13:29:42 -0400
committerBen Gamari <ben@smart-cactus.org>2019-10-21 11:43:54 -0400
commit26c3827f0b878f5bde7b5261076eb8452847fdb4 (patch)
tree45d7ab2d4c838f555fe605a8ef16aec69f703fe4 /includes/Cmm.h
parent1037341648466158fd55bd1d50e1f81c8cfd1516 (diff)
downloadhaskell-26c3827f0b878f5bde7b5261076eb8452847fdb4.tar.gz
Nonmoving: Ensure write barrier vanishes in non-threaded RTS
Diffstat (limited to 'includes/Cmm.h')
-rw-r--r--includes/Cmm.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/includes/Cmm.h b/includes/Cmm.h
index 42aa0bf550..546e81e8f6 100644
--- a/includes/Cmm.h
+++ b/includes/Cmm.h
@@ -950,19 +950,23 @@
return (dst);
+//
+// Nonmoving write barrier helpers
+//
+// See Note [Update remembered set] in NonMovingMark.c.
+
#if defined(THREADED_RTS)
-#define IF_WRITE_BARRIER_ENABLED \
+#define IF_NONMOVING_WRITE_BARRIER_ENABLED \
if (W_[nonmoving_write_barrier_enabled] != 0) (likely: False)
#else
// A similar measure is also taken in rts/NonMoving.h, but that isn't visible from C--
-#define IF_WRITE_BARRIER_ENABLED \
+#define IF_NONMOVING_WRITE_BARRIER_ENABLED \
if (0)
#define nonmoving_write_barrier_enabled 0
#endif
// A useful helper for pushing a pointer to the update remembered set.
-// See Note [Update remembered set] in NonMovingMark.c.
#define updateRemembSetPushPtr(p) \
- IF_WRITE_BARRIER_ENABLED { \
+ IF_NONMOVING_WRITE_BARRIER_ENABLED { \
ccall updateRemembSetPushClosure_(BaseReg "ptr", p "ptr"); \
}