+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
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 */
*/
/* 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. */
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 */
return((void *) op);
}
-#else
-
-extern int GC_quiet;
- /* ANSI C doesn't allow translation units to be empty. */
-
#endif /* GC_GCJ_SUPPORT */
}
#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
/* #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
#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 */
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 */
* 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.
/* 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. */
/* -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 */