diff options
-rw-r--r-- | ChangeLog | 16 | ||||
-rw-r--r-- | backgraph.c | 5 | ||||
-rw-r--r-- | checksums.c | 12 | ||||
-rw-r--r-- | gcj_mlc.c | 5 | ||||
-rw-r--r-- | headers.c | 1 | ||||
-rw-r--r-- | include/private/gc_hdrs.h | 2 | ||||
-rw-r--r-- | mark.c | 2 | ||||
-rw-r--r-- | pthread_stop_world.c | 4 | ||||
-rw-r--r-- | win32_threads.c | 8 |
9 files changed, 28 insertions, 27 deletions
@@ -1,5 +1,21 @@ 2009-10-18 Ivan Maidanski <ivmai@mail.ru> + * backgraph.c (GC_quiet): Remove the declaration (not needed + anymore since gc_priv.h is always included). + * checksums.c (GC_quiet): Ditto. + * gcj_mlc.c (GC_quiet): Ditto. + * headers.c (GC_hdr_cache_hits, GC_hdr_cache_misses): Add the + comment. + * include/private/gc_hdrs.h (GC_hdr_cache_hits, + GC_hdr_cache_misses): Ditto. + * mark.c (GC_first_nonempty): Make the volatile variable STATIC. + * pthread_stop_world.c (GC_stop_count, GC_world_is_stopped): + Ditto. + * win32_threads.c (GC_please_stop, GC_max_thread_index, + GC_mark_mutex_waitcnt): Ditto. + +2009-10-18 Ivan Maidanski <ivmai@mail.ru> + * pthread_support.c (GC_USE_LD_WRAP): Fix a typo (swapped 'L' and 'D') in the name. diff --git a/backgraph.c b/backgraph.c index a4558697..c3cea439 100644 --- a/backgraph.c +++ b/backgraph.c @@ -476,9 +476,4 @@ void GC_print_back_graph_stats(void) GC_deepest_obj = 0; } -#else /* !MAKE_BACK_GRAPH */ - -extern int GC_quiet; - /* ANSI C doesn't allow translation units to be empty. */ - #endif /* !MAKE_BACK_GRAPH */ diff --git a/checksums.c b/checksums.c index d9b26d0d..44f7c7e1 100644 --- a/checksums.c +++ b/checksums.c @@ -12,9 +12,9 @@ */ /* Boehm, March 29, 1995 12:51 pm PST */ -# include "private/gc_priv.h" +#include "private/gc_priv.h" -# ifdef CHECKSUMS +#ifdef CHECKSUMS /* This is debugging code intended to verify the results of dirty bit */ /* computations. Works only in a single threaded environment. */ @@ -222,10 +222,4 @@ out: GC_n_faulted = 0; } -# else - -extern int GC_quiet; - /* ANSI C doesn't allow translation units to be empty. */ - /* So we guarantee this one is nonempty. */ - -# endif /* CHECKSUMS */ +#endif /* CHECKSUMS */ @@ -269,9 +269,4 @@ GC_API void * GC_CALL GC_gcj_malloc_ignore_off_page(size_t lb, return((void *) op); } -#else - -extern int GC_quiet; - /* ANSI C doesn't allow translation units to be empty. */ - #endif /* GC_GCJ_SUPPORT */ @@ -185,6 +185,7 @@ GC_INLINE void free_hdr(hdr * hhdr) } #ifdef COUNT_HDR_CACHE_HITS + /* Used for debugging/profiling (the symbols are externally visible). */ word GC_hdr_cache_hits = 0; word GC_hdr_cache_misses = 0; #endif diff --git a/include/private/gc_hdrs.h b/include/private/gc_hdrs.h index 1e5845da..86b5fbcd 100644 --- a/include/private/gc_hdrs.h +++ b/include/private/gc_hdrs.h @@ -57,7 +57,7 @@ typedef struct hblkhdr hdr; /* #define COUNT_HDR_CACHE_HITS */ # ifdef COUNT_HDR_CACHE_HITS - extern word GC_hdr_cache_hits; + extern word GC_hdr_cache_hits; /* used for debugging/profiling */ extern word GC_hdr_cache_misses; # define HC_HIT() ++GC_hdr_cache_hits # define HC_MISS() ++GC_hdr_cache_misses @@ -114,7 +114,7 @@ size_t GC_mark_stack_size = 0; #ifdef PARALLEL_MARK mse * volatile GC_mark_stack_top = NULL; /* Updated only with mark lock held, but read asynchronously. */ - volatile AO_t GC_first_nonempty; + STATIC volatile AO_t GC_first_nonempty = 0; /* Lowest entry on mark stack */ /* that may be nonempty. */ /* Updated only by initiating */ diff --git a/pthread_stop_world.c b/pthread_stop_world.c index 6f2ceff0..865b436f 100644 --- a/pthread_stop_world.c +++ b/pthread_stop_world.c @@ -85,10 +85,10 @@ STATIC void GC_remove_allowed_signals(sigset_t *set) static sigset_t suspend_handler_mask; -volatile AO_t GC_stop_count = 0; +STATIC volatile AO_t GC_stop_count = 0; /* Incremented at the beginning of GC_stop_world. */ -volatile AO_t GC_world_is_stopped = FALSE; +STATIC volatile AO_t GC_world_is_stopped = FALSE; /* FALSE ==> it is safe for threads to restart, i.e. */ /* they will see another suspend signal before they */ /* are expected to stop (unless they have voluntarily */ diff --git a/win32_threads.c b/win32_threads.c index cc2b61dc..47b3724a 100644 --- a/win32_threads.c +++ b/win32_threads.c @@ -261,7 +261,7 @@ typedef volatile struct GC_Thread_Rep * GC_vthread; * volatiles. This code should consistently use atomic_ops. */ -volatile GC_bool GC_please_stop = FALSE; +STATIC volatile GC_bool GC_please_stop = FALSE; /* * We track thread attachments while the world is supposed to be stopped. @@ -305,7 +305,7 @@ GC_bool GC_started_thread_while_stopped(void) /* since we look them up with sequential search. */ volatile struct GC_Thread_Rep dll_thread_table[MAX_THREADS]; -volatile LONG GC_max_thread_index = 0; +STATIC volatile LONG GC_max_thread_index = 0; /* Largest index in dll_thread_table */ /* that was ever used. */ @@ -1727,8 +1727,8 @@ void GC_get_next_stack(char *start, char *limit, /* -1 - locked and waiters may exist. */ /* Accessed by InterlockedExchange(). */ # else - volatile AO_t GC_mark_mutex_waitcnt = 0; /* Number of waiters + 1; */ - /* 0 - unlocked. */ + STATIC volatile AO_t GC_mark_mutex_waitcnt = 0; + /* Number of waiters + 1; 0 - unlocked. */ # endif /* #define LOCK_STATS */ |