From 4be945a80fe79d6357e2a5525aa6aea4d8a514c1 Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Sat, 2 Jun 2012 12:33:03 +0400 Subject: [PATCH 2/9] Fix visibility of GC_push_all/conditional, GC_push_other_roots symbols * include/private/gc_priv.h (GC_push_all, GC_push_other_roots): Declare as GC_API_PRIV (instead of GC_INNER) to make the symbol externally visible to some well-known 3rd-party software (e.g., ECL). * include/private/gc_priv.h (GC_push_conditional): Declare as GC_API_PRIV (only if GC_DISABLE_INCREMENTAL is undefined). * mark.c (GC_push_all, GC_push_conditional): Remove GC_INNER (to match the declaration). * os_dep.c (GC_push_other_roots): Likewise. --- include/private/gc_priv.h | 10 ++++++---- mark.c | 4 ++-- os_dep.c | 4 ++-- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/include/private/gc_priv.h b/include/private/gc_priv.h index 5afa916..9d728a9 100644 --- a/include/private/gc_priv.h +++ b/include/private/gc_priv.h @@ -1428,11 +1428,11 @@ GC_INNER void GC_initiate_gc(void); GC_INNER GC_bool GC_collection_in_progress(void); /* Collection is in progress, or was abandoned. */ -GC_INNER void GC_push_all(ptr_t bottom, ptr_t top); +GC_API_PRIV void GC_push_all(ptr_t bottom, ptr_t top); /* Push everything in a range */ /* onto mark stack. */ #ifndef GC_DISABLE_INCREMENTAL - GC_INNER void GC_push_conditional(ptr_t b, ptr_t t, GC_bool all); + GC_API_PRIV void GC_push_conditional(ptr_t b, ptr_t t, GC_bool all); #else # define GC_push_conditional(b, t, all) GC_push_all(b, t) #endif @@ -1456,13 +1456,15 @@ GC_INNER void GC_push_all_eager(ptr_t b, ptr_t t); GC_INNER void GC_push_roots(GC_bool all, ptr_t cold_gc_frame); /* Push all or dirty roots. */ -GC_EXTERN void (*GC_push_other_roots)(void); +GC_API_PRIV void (*GC_push_other_roots)(void); /* Push system or application specific roots */ /* onto the mark stack. In some environments */ /* (e.g. threads environments) this is */ /* predefined to be non-zero. A client */ /* supplied replacement should also call the */ - /* original function. */ + /* original function. Remains externally */ + /* visible as used by some well-known 3rd-party */ + /* software (e.g., ECL) currently. */ GC_INNER void GC_push_finalizer_structures(void); #ifdef THREADS diff --git a/mark.c b/mark.c index 746f1bd..cc8dfde 100644 --- a/mark.c +++ b/mark.c @@ -1259,7 +1259,7 @@ GC_INNER void GC_mark_init(void) * Should only be used if there is no possibility of mark stack * overflow. */ -GC_INNER void GC_push_all(ptr_t bottom, ptr_t top) +void GC_push_all(ptr_t bottom, ptr_t top) { register word length; @@ -1332,7 +1332,7 @@ GC_INNER void GC_push_all(ptr_t bottom, ptr_t top) } } - GC_INNER void GC_push_conditional(ptr_t bottom, ptr_t top, GC_bool all) + void GC_push_conditional(ptr_t bottom, ptr_t top, GC_bool all) { if (!all) { GC_push_selected(bottom, top, GC_page_was_dirty); diff --git a/os_dep.c b/os_dep.c index 17dabcd..c1b7f20 100644 --- a/os_dep.c +++ b/os_dep.c @@ -2523,7 +2523,7 @@ GC_INNER void GC_unmap_gap(ptr_t start1, size_t bytes1, ptr_t start2, /* environment, this is also responsible for marking from */ /* thread stacks. */ #ifndef THREADS - GC_INNER void (*GC_push_other_roots)(void) = 0; + void (*GC_push_other_roots)(void) = 0; #else /* THREADS */ # ifdef PCR @@ -2587,7 +2587,7 @@ STATIC void GC_default_push_other_roots(void) } # endif /* SN_TARGET_PS3 */ - GC_INNER void (*GC_push_other_roots)(void) = GC_default_push_other_roots; + void (*GC_push_other_roots)(void) = GC_default_push_other_roots; #endif /* THREADS */ /* -- 1.7.10.2