PowerPC safepoints
[sbcl.git] / src / runtime / gencgc.c
index 838bcac..c8defa3 100644 (file)
@@ -3543,10 +3543,18 @@ garbage_collect_generation(generation_index_t generation, int raise)
             scavenge_control_stack(th);
         }
 
+# ifdef LISP_FEATURE_SB_SAFEPOINT
+        /* In this case, scrub all stacks right here from the GCing thread
+         * instead of doing what the comment below says.  Suboptimal, but
+         * easier. */
+        for_each_thread(th)
+            scrub_thread_control_stack(th);
+# else
         /* Scrub the unscavenged control stack space, so that we can't run
          * into any stale pointers in a later GC (this is done by the
          * stop-for-gc handler in the other threads). */
         scrub_control_stack();
+# endif
     }
 #endif