]> granicus.if.org Git - gc/commitdiff
Fix GC_remove_all_threads_but_me to cleanup thread-specific data storage
authorIvan Maidanski <ivmai@mail.ru>
Sat, 21 Apr 2012 15:57:25 +0000 (19:57 +0400)
committerIvan Maidanski <ivmai@mail.ru>
Sat, 21 Apr 2012 15:58:20 +0000 (19:58 +0400)
* pthread_support.c (GC_remove_all_threads_but_me): Call
GC_remove_specific after destroying thread-local list.

pthread_support.c

index d86c617f152a816c26458e3995e433ef35cff969..ca455d7655021376c65b92f27e3fffca33129efc 100644 (file)
@@ -681,6 +681,7 @@ STATIC void GC_remove_all_threads_but_me(void)
 #         ifdef THREAD_LOCAL_ALLOC
             if (!(p -> flags & FINISHED)) {
               GC_destroy_thread_local(&(p->tlfs));
+              GC_remove_specific(GC_thread_key);
             }
 #         endif
           if (p != &first_thread) GC_INTERNAL_FREE(p);