diff options
author | Koushik Dutta <koushd@gmail.com> | 2010-09-30 08:15:42 +0400 |
---|---|---|
committer | Geoff Norton <grompf@sublimeintervention.com> | 2010-10-01 20:33:18 +0400 |
commit | c45cae8a26d869dc9db7513f0564229189ae03f7 (patch) | |
tree | a23cb453e48ea565b17eba17e3067116f788e673 /libgc/pthread_support.c | |
parent | 0e8579212966de44911c628212ac321538890e9d (diff) |
Work around Android's pthread/kernel_id/fork bug to fix mono multithreading and GC_stop_world in processes that have been forked.
Diffstat (limited to 'libgc/pthread_support.c')
-rw-r--r-- | libgc/pthread_support.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libgc/pthread_support.c b/libgc/pthread_support.c index f0132044a09..f70d4f6e731 100644 --- a/libgc/pthread_support.c +++ b/libgc/pthread_support.c @@ -692,6 +692,9 @@ GC_thread GC_new_thread(pthread_t id) } if (result == 0) return(0); result -> id = id; +#ifdef PLATFORM_ANDROID + result -> kernel_id = gettid(); +#endif result -> next = GC_threads[hv]; GC_threads[hv] = result; GC_ASSERT(result -> flags == 0 && result -> thread_blocked == 0); |