[svn:parrot] r43746 - branches/gc_encapsulate/src/gc

bacek at svn.parrot.org bacek at svn.parrot.org
Sun Feb 7 06:14:16 UTC 2010


Author: bacek
Date: Sun Feb  7 06:14:15 2010
New Revision: 43746
URL: https://trac.parrot.org/parrot/changeset/43746

Log:
Implement total_unblock in terms of unblock_mark/unblock_sweep

Modified:
   branches/gc_encapsulate/src/gc/api.c

Modified: branches/gc_encapsulate/src/gc/api.c
==============================================================================
--- branches/gc_encapsulate/src/gc/api.c	Sun Feb  7 06:12:55 2010	(r43745)
+++ branches/gc_encapsulate/src/gc/api.c	Sun Feb  7 06:14:15 2010	(r43746)
@@ -1004,7 +1004,6 @@
 Parrot_is_blocked_GC_mark(PARROT_INTERP)
 {
     ASSERT_ARGS(Parrot_is_blocked_GC_mark)
-    //return interp->mem_pools->gc_mark_block_level;
     if (interp->gc_sys->is_blocked_gc_mark)
         return interp->gc_sys->is_blocked_gc_mark(interp);
     else
@@ -1016,7 +1015,6 @@
 Parrot_is_blocked_GC_sweep(PARROT_INTERP)
 {
     ASSERT_ARGS(Parrot_is_blocked_GC_sweep)
-    //return interp->mem_pools->gc_sweep_block_level;
     if (interp->gc_sys->is_blocked_gc_sweep)
         return interp->gc_sys->is_blocked_gc_sweep(interp);
     else
@@ -1027,9 +1025,12 @@
 Parrot_gc_completely_unblock(PARROT_INTERP)
 {
     ASSERT_ARGS(Parrot_gc_completely_unblock)
-    // XXX
-    // interp->mem_pools->gc_mark_block_level  = 0;
-    // interp->mem_pools->gc_sweep_block_level = 0;
+
+    while (Parrot_is_blocked_GC_mark(interp))
+        Parrot_unblock_GC_mark(interp);
+
+    while (Parrot_is_blocked_GC_sweep(interp))
+        Parrot_unblock_GC_sweep(interp);
 }
 
 /*


More information about the parrot-commits mailing list