From 899dca153afc7f087b8748d6f623848f8a499fef Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Mon, 27 Feb 2012 20:23:19 +0400 Subject: [PATCH] Delete GC_init_parallel call in some redirected pthread functions (Win32) * win32_threads.c (GC_pthread_join, GC_pthread_sigmask, GC_pthread_detach): Remove useless GC_init_parallel() call (since parallel_initialized is set either by GC_allow_register_threads or by redirected pthread_create). --- win32_threads.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/win32_threads.c b/win32_threads.c index 17422dd5..fe206520 100644 --- a/win32_threads.c +++ b/win32_threads.c @@ -2505,9 +2505,6 @@ GC_INNER void GC_thr_init(void) (long)GetCurrentThreadId(), GC_PTHREAD_PTRVAL(pthread_id)); # endif - if (!EXPECT(parallel_initialized, TRUE)) - GC_init_parallel(); - /* Thread being joined might not have registered itself yet. */ /* After the join,thread id may have been recycled. */ /* FIXME: It would be better if this worked more like */ @@ -2669,8 +2666,6 @@ GC_INNER void GC_thr_init(void) GC_API int GC_pthread_sigmask(int how, const sigset_t *set, sigset_t *oset) { - if (!EXPECT(parallel_initialized, TRUE)) - GC_init_parallel(); return pthread_sigmask(how, set, oset); } # endif /* !GC_NO_PTHREAD_SIGMASK */ @@ -2681,8 +2676,6 @@ GC_INNER void GC_thr_init(void) GC_thread t; DCL_LOCK_STATE; - if (!EXPECT(parallel_initialized, TRUE)) - GC_init_parallel(); LOCK(); t = GC_lookup_pthread(thread); UNLOCK(); -- 2.40.0