]> granicus.if.org Git - gc/commitdiff
Make GC_mark_lock_holder variable static
authorIvan Maidanski <ivmai@mail.ru>
Mon, 15 Jul 2013 11:40:49 +0000 (15:40 +0400)
committerIvan Maidanski <ivmai@mail.ru>
Mon, 15 Jul 2013 11:40:49 +0000 (15:40 +0400)
* 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.

include/private/gc_locks.h
pthread_support.c
win32_threads.c

index 6696651de4d814e61d66e5785e4713aee48b5633..4974afac21c9334c86b39993351f3a08dc976136 100644 (file)
 #    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;
 
index 266991d6a27f38b18d29c8623c1f4f6b9a050174..975c0816d8ed6e12d2db6014965d5aef0f73e5d9 100644 (file)
@@ -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      */
index c37d529e8b6ad451249c8494d886993f9a6eeb35..0431e7e64336126237103aef15c9549f75dad822 100644 (file)
@@ -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  */