summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog16
-rw-r--r--backgraph.c5
-rw-r--r--checksums.c12
-rw-r--r--gcj_mlc.c5
-rw-r--r--headers.c1
-rw-r--r--include/private/gc_hdrs.h2
-rw-r--r--mark.c2
-rw-r--r--pthread_stop_world.c4
-rw-r--r--win32_threads.c8
9 files changed, 28 insertions, 27 deletions
diff --git a/ChangeLog b/ChangeLog
index 749c4be4..c640691a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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 */
diff --git a/gcj_mlc.c b/gcj_mlc.c
index 265252d5..e5c0baca 100644
--- a/gcj_mlc.c
+++ b/gcj_mlc.c
@@ -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 */
diff --git a/headers.c b/headers.c
index 82a60f56..3f0273a5 100644
--- a/headers.c
+++ b/headers.c
@@ -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
diff --git a/mark.c b/mark.c
index 5320a49a..208d9593 100644
--- a/mark.c
+++ b/mark.c
@@ -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 */