Fix GC_remove_all_threads_but_me for Android (fork support)
authorIvan Maidanski <ivmai@mail.ru>
Fri, 30 Nov 2012 14:01:30 +0000 (18:01 +0400)
committerIvan Maidanski <ivmai@mail.ru>
Fri, 30 Nov 2012 14:01:30 +0000 (18:01 +0400)
* pthread_support.c (GC_remove_all_threads_but_me): Update kernel_id
of "me" (if PLATFORM_ANDROID).

pthread_support.c

index c65ecfa..da24d10 100644 (file)
@@ -677,6 +677,8 @@ STATIC void GC_remove_all_threads_but_me(void)
             /* GC_destroy_thread_local and GC_free_internal     */
             /* before update).                                  */
             me -> stop_info.mach_thread = mach_thread_self();
+#         elif defined(PLATFORM_ANDROID)
+            me -> kernel_id = gettid();
 #         endif
 #         if defined(THREAD_LOCAL_ALLOC) && !defined(USE_CUSTOM_SPECIFIC)
             /* Some TLS implementations might be not fork-friendly, so  */