boehm-gc: revert all CACAO-specific modifications; this is now an exact copy of the...
[cacao.git] / src / mm / boehm-gc / blacklst.c
index bea0474588ed486680381ec161c1aeb3776cbe69..f75ed901f648ef8aeb098c84f03432f04657f3f9 100644 (file)
@@ -12,9 +12,6 @@
  * modified is included with the above copyright notice.
  */
 /* Boehm, August 9, 1995 6:09 pm PDT */
-
-#include "config.h"
-
 # include "private/gc_priv.h"
 
 /*
 
 /* Pointers to individual tables.  We replace one table by another by  */
 /* switching these pointers.                                           */
-word * GC_old_normal_bl;
+STATIC word * GC_old_normal_bl;
                /* Nonstack false references seen at last full          */
                /* collection.                                          */
-word * GC_incomplete_normal_bl;
+STATIC word * GC_incomplete_normal_bl;
                /* Nonstack false references seen since last            */
                /* full collection.                                     */
-word * GC_old_stack_bl;
-word * GC_incomplete_stack_bl;
+STATIC word * GC_old_stack_bl;
+STATIC word * GC_incomplete_stack_bl;
 
 word GC_total_stack_black_listed;
 
@@ -65,7 +62,8 @@ void GC_default_print_heap_obj_proc(ptr_t p)
 
 void (*GC_print_heap_obj) (ptr_t p) = GC_default_print_heap_obj_proc;
 
-void GC_print_source_ptr(ptr_t p)
+#ifdef PRINT_BLACK_LIST
+STATIC void GC_print_source_ptr(ptr_t p)
 {
     ptr_t base = GC_base(p);
     if (0 == base) {
@@ -76,9 +74,13 @@ void GC_print_source_ptr(ptr_t p)
        }
     } else {
        GC_err_printf("in object at ");
-       (*GC_print_heap_obj)(base);
+       /* FIXME: We can't call the debug version of GC_print_heap_obj  */
+       /* (with PRINT_CALL_CHAIN) here because the lock is held and    */
+       /* the world is stopped.                                        */
+       GC_default_print_heap_obj_proc(base);
     }
 }
+#endif
 
 void GC_bl_init(void)
 {
@@ -192,7 +194,6 @@ void GC_unpromote_black_lists(void)
 /* And the same for false pointers from the stack. */
 #ifdef PRINT_BLACK_LIST
   void GC_add_to_black_list_stack(word p, ptr_t source)
-  ptr_t source;
 #else
   void GC_add_to_black_list_stack(word p)
 #endif