]> granicus.if.org Git - gc/commitdiff
Delete GC_init_parallel call in some redirected pthread functions (Win32)
authorIvan Maidanski <ivmai@mail.ru>
Mon, 27 Feb 2012 16:23:19 +0000 (20:23 +0400)
committerIvan Maidanski <ivmai@mail.ru>
Mon, 27 Feb 2012 16:23:19 +0000 (20:23 +0400)
* 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

index 17422dd579c059d8ca652e69a54e9a024aa1fbab..fe2065206069468cefe48e452b265c9ce195ae28 100644 (file)
@@ -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();