(fix of commit
8e6460052)
* include/private/gc_priv.h [THREADS] (GC_in_thread_creation): Declare
not only for pthreads.
* misc.c [!DONT_USE_ATEXIT && THREADS] (GC_exit_check): Set
GC_in_thread_creation to true before calling GC_gcollect for windows
threads as well.
* win32_threads.c (GC_in_thread_creation): Change STATIC to GC_INNER.
#define GC_gcollect_inner() \
(void)GC_try_to_collect_inner(GC_never_stop_func)
-#if defined(GC_PTHREADS) && !defined(GC_WIN32_THREADS)
+#ifdef THREADS
GC_EXTERN GC_bool GC_in_thread_creation;
/* We may currently be in thread creation or destruction. */
/* Only set to TRUE while allocation lock is held. */
STATIC void GC_exit_check(void)
{
if (GC_find_leak && !skip_gc_atexit) {
-# if defined(GC_PTHREADS) && !defined(GC_WIN32_THREADS)
+# ifdef THREADS
GC_in_thread_creation = TRUE; /* OK to collect from unknown thread. */
GC_gcollect();
GC_in_thread_creation = FALSE;
return(result);
}
-STATIC GC_bool GC_in_thread_creation = FALSE;
+GC_INNER GC_bool GC_in_thread_creation = FALSE;
/* Protected by allocation lock. */
GC_INLINE void GC_record_stack_base(GC_vthread me,