summaryrefslogtreecommitdiff
path: root/pthread_support.c
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2012-11-30 18:01:30 +0400
committerIvan Maidanski <ivmai@mail.ru>2012-11-30 18:01:30 +0400
commit9178e2b8f10eab0ac54c504c85022d0ea8ded36b (patch)
tree55a92fabe5e652c237634a5aff3f4c9c666b2855 /pthread_support.c
parentb805f60424e35e0b175a398c99c7cd50ed933993 (diff)
downloadbdwgc-9178e2b8f10eab0ac54c504c85022d0ea8ded36b.tar.gz
Fix GC_remove_all_threads_but_me for Android (fork support)
* pthread_support.c (GC_remove_all_threads_but_me): Update kernel_id of "me" (if PLATFORM_ANDROID).
Diffstat (limited to 'pthread_support.c')
-rw-r--r--pthread_support.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/pthread_support.c b/pthread_support.c
index c65ecfab..da24d10e 100644
--- a/pthread_support.c
+++ b/pthread_support.c
@@ -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 */