From b19bcfd953fdb10059753c1270ac1e4631da0f53 Mon Sep 17 00:00:00 2001 From: Simon Marlow Date: Thu, 29 Jun 2006 12:05:26 +0000 Subject: use the new "prim %write_barrier()" in .cmm instead of calls to wb() --- rts/Updates.h | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) (limited to 'rts/Updates.h') diff --git a/rts/Updates.h b/rts/Updates.h index f20b088432..c8c75b130e 100644 --- a/rts/Updates.h +++ b/rts/Updates.h @@ -277,7 +277,7 @@ FILL_SLOP(StgClosure *p) DEBUG_FILL_SLOP(p1); \ LDV_RECORD_DEAD_FILL_SLOP_DYNAMIC(p1); \ StgInd_indirectee(p1) = p2; \ - foreign "C" wb() []; \ + prim %write_barrier() []; \ bd = Bdescr(p1); \ if (bdescr_gen_no(bd) != 0 :: CInt) { \ foreign "C" recordMutableCap(p1 "ptr", \ @@ -294,28 +294,28 @@ FILL_SLOP(StgClosure *p) and_then; \ } #else -#define updateWithIndirection(ind_info, p1, p2, and_then) \ - { \ - bdescr *bd; \ - \ - /* cas(p1, 0, &stg_WHITEHOLE_info); */ \ - ASSERT( (P_)p1 != (P_)p2 && !closure_IND(p1) ); \ - DEBUG_FILL_SLOP(p1); \ - LDV_RECORD_DEAD_FILL_SLOP_DYNAMIC(p1); \ - ((StgInd *)p1)->indirectee = p2; \ - wb(); \ - bd = Bdescr((P_)p1); \ - if (bd->gen_no != 0) { \ - recordMutableGenLock(p1, &generations[bd->gen_no]); \ - SET_INFO(p1, &stg_IND_OLDGEN_info); \ - TICK_UPD_OLD_IND(); \ - and_then; \ - } else { \ - SET_INFO(p1, ind_info); \ - LDV_RECORD_CREATE(p1); \ - TICK_UPD_NEW_IND(); \ - and_then; \ - } \ +#define updateWithIndirection(ind_info, p1, p2, and_then) \ + { \ + bdescr *bd; \ + \ + /* cas(p1, 0, &stg_WHITEHOLE_info); */ \ + ASSERT( (P_)p1 != (P_)p2 && !closure_IND(p1) ); \ + DEBUG_FILL_SLOP(p1); \ + LDV_RECORD_DEAD_FILL_SLOP_DYNAMIC(p1); \ + ((StgInd *)p1)->indirectee = p2; \ + write_barrier(); \ + bd = Bdescr((P_)p1); \ + if (bd->gen_no != 0) { \ + recordMutableGenLock(p1, &generations[bd->gen_no]); \ + SET_INFO(p1, &stg_IND_OLDGEN_info); \ + TICK_UPD_OLD_IND(); \ + and_then; \ + } else { \ + SET_INFO(p1, ind_info); \ + LDV_RECORD_CREATE(p1); \ + TICK_UPD_NEW_IND(); \ + and_then; \ + } \ } #endif -- cgit v1.2.1