summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2013-07-15 13:40:49 +0200
committerIvan Maidanski <ivmai@mail.ru>2013-07-15 13:40:49 +0200
commitc3b49f5a6764f82e34c0d2fbc4462d92b865dc75 (patch)
tree06d40180aeee928ef81fee816f54dd37201b9e38
parent89ff5faae1af92198706fa406b5780e6a10df0bf (diff)
Make GC_mark_lock_holder variable static
* include/private/gc_locks.h (GC_mark_lock_holder): Remove declaration. * pthread_support.c (GC_mark_lock_holder): Change from GC_INNER to STATIC (defined only if GC_ASSERTIONS). * win32_threads.c (GC_mark_lock_holder): Likewise.
-rw-r--r--include/private/gc_locks.h3
-rw-r--r--pthread_support.c6
-rw-r--r--win32_threads.c2
3 files changed, 4 insertions, 7 deletions
diff --git a/include/private/gc_locks.h b/include/private/gc_locks.h
index 6696651..4974afa 100644
--- a/include/private/gc_locks.h
+++ b/include/private/gc_locks.h
@@ -178,9 +178,6 @@
# define EXIT_GC() GC_collecting = 0;
GC_INNER void GC_lock(void);
GC_EXTERN unsigned long GC_lock_holder;
-# if defined(GC_ASSERTIONS) && defined(PARALLEL_MARK)
- GC_EXTERN unsigned long GC_mark_lock_holder;
-# endif
# endif /* GC_PTHREADS with linux_threads.c implementation */
GC_EXTERN GC_bool GC_need_to_lock;
diff --git a/pthread_support.c b/pthread_support.c
index 266991d..975c081 100644
--- a/pthread_support.c
+++ b/pthread_support.c
@@ -1941,9 +1941,9 @@ GC_INNER void GC_lock(void)
#ifdef PARALLEL_MARK
-#ifdef GC_ASSERTIONS
- GC_INNER unsigned long GC_mark_lock_holder = NO_THREAD;
-#endif
+# ifdef GC_ASSERTIONS
+ STATIC unsigned long GC_mark_lock_holder = NO_THREAD;
+# endif
#ifdef GLIBC_2_1_MUTEX_HACK
/* Ugly workaround for a linux threads bug in the final versions */
diff --git a/win32_threads.c b/win32_threads.c
index c37d529..0431e7e 100644
--- a/win32_threads.c
+++ b/win32_threads.c
@@ -1717,7 +1717,7 @@ GC_INNER void GC_get_next_stack(char *start, char *limit,
}
# ifdef GC_ASSERTIONS
- GC_INNER unsigned long GC_mark_lock_holder = NO_THREAD;
+ STATIC unsigned long GC_mark_lock_holder = NO_THREAD;
# endif
/* GC_mark_threads[] is unused here unlike that in pthread_support.c */