From: Ivan Maidanski Date: Thu, 29 Oct 2015 21:08:44 +0000 (+0300) Subject: Do no declare kernel_id field of GC_Thread_Rep for 64-bit Android X-Git-Tag: gc7_6_0~114 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9a0a94c4f27fd7930406ad804dfc845456e6c6dd;p=platform%2Fupstream%2Flibgc.git Do no declare kernel_id field of GC_Thread_Rep for 64-bit Android * include/private/pthread_support.h (GC_Thread_Rep): Do not declare kernel_id field unless USE_TKILL_ON_ANDROID (instead of PLATFORM_ANDROID). * pthread_support.c (GC_new_thread, GC_remove_all_threads_but_me): Do not set kernel_id field unless USE_TKILL_ON_ANDROID. --- diff --git a/include/private/pthread_support.h b/include/private/pthread_support.h index 7b4814c..294aeed 100644 --- a/include/private/pthread_support.h +++ b/include/private/pthread_support.h @@ -46,7 +46,7 @@ typedef struct GC_Thread_Rep { /* guaranteed to be dead, but we may */ /* not yet have registered the join.) */ pthread_t id; -# ifdef PLATFORM_ANDROID +# ifdef USE_TKILL_ON_ANDROID pid_t kernel_id; # endif /* Extra bookkeeping information the stopping code uses */ diff --git a/pthread_support.c b/pthread_support.c index 7c5af41..d9f935f 100644 --- a/pthread_support.c +++ b/pthread_support.c @@ -513,7 +513,7 @@ STATIC GC_thread GC_new_thread(pthread_t id) if (result == 0) return(0); } result -> id = id; -# ifdef PLATFORM_ANDROID +# ifdef USE_TKILL_ON_ANDROID result -> kernel_id = gettid(); # endif result -> next = GC_threads[hv]; @@ -717,7 +717,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) +# endif +# ifdef USE_TKILL_ON_ANDROID me -> kernel_id = gettid(); # endif # if defined(THREAD_LOCAL_ALLOC) && !defined(USE_CUSTOM_SPECIFIC)