aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.4.3/gcc/gthr-posix.h
diff options
context:
space:
mode:
authorJing Yu <jingyu@google.com>2010-07-22 14:39:44 -0700
committerJing Yu <jingyu@google.com>2010-07-22 14:39:44 -0700
commitf01e65905acd1e2052e875130cb723a658765bc8 (patch)
tree59218ed4db7b694046c1a5bf24bfb18005c0edf8 /gcc-4.4.3/gcc/gthr-posix.h
parentb094d6c4bf572654a031ecc4afe675154c886dc5 (diff)
downloadtoolchain_gcc-f01e65905acd1e2052e875130cb723a658765bc8.tar.gz
toolchain_gcc-f01e65905acd1e2052e875130cb723a658765bc8.tar.bz2
toolchain_gcc-f01e65905acd1e2052e875130cb723a658765bc8.zip
Backport upstream arm-linux-androideabi target to gcc-4.4.3.
From now on, the general Android toolchain will be arm-linux-androideabi. arm-eabi toolchain built from this source does not contain Android specific configurations and will only be used to build Android kernel. Read recent changes in toolchain/build/README for more details. Change-Id: I7526576949b55809da5c24d34e1df884301c05b2
Diffstat (limited to 'gcc-4.4.3/gcc/gthr-posix.h')
-rw-r--r--gcc-4.4.3/gcc/gthr-posix.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/gcc-4.4.3/gcc/gthr-posix.h b/gcc-4.4.3/gcc/gthr-posix.h
index 82a3c581c..27652f96b 100644
--- a/gcc-4.4.3/gcc/gthr-posix.h
+++ b/gcc-4.4.3/gcc/gthr-posix.h
@@ -124,7 +124,9 @@ __gthrw(pthread_join)
__gthrw(pthread_equal)
__gthrw(pthread_self)
__gthrw(pthread_detach)
+#ifndef __BIONIC__
__gthrw(pthread_cancel)
+#endif
__gthrw(sched_yield)
__gthrw(pthread_mutex_lock)
@@ -237,8 +239,16 @@ __gthread_active_p (void)
static inline int
__gthread_active_p (void)
{
- static void *const __gthread_active_ptr
- = __extension__ (void *) &__gthrw_(pthread_cancel);
+ static void *const __gthread_active_ptr
+ = __extension__ (void *) &__gthrw_(
+/* Android's C library does not provide pthread_cancel, check for
+ `pthread_create' instead. */
+#ifndef __BIONIC__
+ pthread_cancel
+#else
+ pthread_create
+#endif
+ );
return __gthread_active_ptr != 0;
}