diff options
Diffstat (limited to 'rts/ThreadPaused.c')
-rw-r--r-- | rts/ThreadPaused.c | 19 |
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 |