[project @ 2005-11-24 14:28:41 by simonmar]
authorsimonmar <unknown>
Thu, 24 Nov 2005 14:28:41 +0000 (14:28 +0000)
committersimonmar <unknown>
Thu, 24 Nov 2005 14:28:41 +0000 (14:28 +0000)
strictly speaking, we also need write barriers in the update code too
(although gcc hasn't been caught doing any reordering here, as yet).

ghc/rts/Updates.h

index 37bb9a2..0ec619a 100644 (file)
@@ -266,6 +266,7 @@ DEBUG_FILL_SLOP(StgClosure *p)
     DEBUG_FILL_SLOP(p1);                                       \
     LDV_RECORD_DEAD_FILL_SLOP_DYNAMIC(p1);                     \
     StgInd_indirectee(p1) = p2;                                        \
+    foreign "C" wb() [];                                       \
     bd = Bdescr(p1);                                           \
     if (bdescr_gen_no(bd) != 0 :: CInt) {                      \
       foreign "C" recordMutableCap(p1 "ptr",                   \
@@ -291,6 +292,7 @@ DEBUG_FILL_SLOP(StgClosure *p)
     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]);              \