summaryrefslogtreecommitdiff
path: root/rts/ThreadPaused.c
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 /rts/ThreadPaused.c
parent1037341648466158fd55bd1d50e1f81c8cfd1516 (diff)
downloadhaskell-26c3827f0b878f5bde7b5261076eb8452847fdb4.tar.gz
Nonmoving: Ensure write barrier vanishes in non-threaded RTS
Diffstat (limited to 'rts/ThreadPaused.c')
-rw-r--r--rts/ThreadPaused.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/rts/ThreadPaused.c b/rts/ThreadPaused.c
index 5cbb3f5595..368f99a4f9 100644
--- a/rts/ThreadPaused.c
+++ b/rts/ThreadPaused.c
@@ -334,15 +334,16 @@ threadPaused(Capability *cap, StgTSO *tso)
}
#endif
- if (RTS_UNLIKELY(nonmoving_write_barrier_enabled
- && ip_THUNK(INFO_PTR_TO_STRUCT(bh_info)))) {
- // We are about to replace a thunk with a blackhole.
- // Add the free variables of the closure we are about to
- // overwrite to the update remembered set.
- // N.B. We caught the WHITEHOLE case above.
- updateRemembSetPushThunkEager(cap,
- THUNK_INFO_PTR_TO_STRUCT(bh_info),
- (StgThunk *) bh);
+ IF_NONMOVING_WRITE_BARRIER_ENABLED {
+ if (ip_THUNK(INFO_PTR_TO_STRUCT(bh_info))) {
+ // We are about to replace a thunk with a blackhole.
+ // Add the free variables of the closure we are about to
+ // overwrite to the update remembered set.
+ // N.B. We caught the WHITEHOLE case above.
+ updateRemembSetPushThunkEager(cap,
+ THUNK_INFO_PTR_TO_STRUCT(bh_info),
+ (StgThunk *) bh);
+ }
}
// The payload of the BLACKHOLE points to the TSO