Wrap gcc on Windows, to provide the -B flags
[ghc-hetmet.git] / rts / sm / Storage.c
index 97615e9..f0506cd 100644 (file)
@@ -330,6 +330,7 @@ newCAF(StgClosure* caf)
 {
   ACQUIRE_SM_LOCK;
 
+#ifdef DYNAMIC
   if(keepCAFs)
   {
     // HACK:
@@ -347,6 +348,7 @@ newCAF(StgClosure* caf)
     caf_list = caf;
   }
   else
+#endif
   {
     /* Put this CAF on the mutable list for the old generation.
     * This is a HACK - the IND_STATIC closure doesn't really have
@@ -850,7 +852,7 @@ void
 setTSOLink (Capability *cap, StgTSO *tso, StgTSO *target)
 {
     bdescr *bd;
-    if ((tso->flags & (TSO_DIRTY|TSO_LINK_DIRTY)) == 0) {
+    if (tso->dirty == 0 && (tso->flags & TSO_LINK_DIRTY) == 0) {
         tso->flags |= TSO_LINK_DIRTY;
        bd = Bdescr((StgPtr)tso);
        if (bd->gen_no > 0) recordMutableCap((StgClosure*)tso,cap,bd->gen_no);
@@ -862,11 +864,11 @@ void
 dirty_TSO (Capability *cap, StgTSO *tso)
 {
     bdescr *bd;
-    if ((tso->flags & (TSO_DIRTY|TSO_LINK_DIRTY)) == 0) {
+    if (tso->dirty == 0 && (tso->flags & TSO_LINK_DIRTY) == 0) {
        bd = Bdescr((StgPtr)tso);
        if (bd->gen_no > 0) recordMutableCap((StgClosure*)tso,cap,bd->gen_no);
     }
-    tso->flags |= TSO_DIRTY;
+    tso->dirty = 1;
 }
 
 /*