summaryrefslogtreecommitdiff
path: root/rts/Updates.h
diff options
context:
space:
mode:
authorSimon Marlow <simonmar@microsoft.com>2006-06-29 12:05:26 +0000
committerSimon Marlow <simonmar@microsoft.com>2006-06-29 12:05:26 +0000
commitb19bcfd953fdb10059753c1270ac1e4631da0f53 (patch)
tree94b058e349cbb770b64a59314cdf0d69252b11e6 /rts/Updates.h
parent47f809644d5ccba8be7a27a9d8ebbb818cac33ef (diff)
downloadhaskell-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.h46
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