diff options
author | Simon Marlow <simonmar@microsoft.com> | 2006-06-29 12:05:26 +0000 |
---|---|---|
committer | Simon Marlow <simonmar@microsoft.com> | 2006-06-29 12:05:26 +0000 |
commit | b19bcfd953fdb10059753c1270ac1e4631da0f53 (patch) | |
tree | 94b058e349cbb770b64a59314cdf0d69252b11e6 /rts/Updates.h | |
parent | 47f809644d5ccba8be7a27a9d8ebbb818cac33ef (diff) | |
download | haskell-b19bcfd953fdb10059753c1270ac1e4631da0f53.tar.gz |
use the new "prim %write_barrier()" in .cmm instead of calls to wb()
Diffstat (limited to 'rts/Updates.h')
-rw-r--r-- | rts/Updates.h | 46 |
1 files changed, 23 insertions, 23 deletions
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 |