Bionic C library.
(__gthread_active_p): Check for pthread_create if compiling against
Bionic C library.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159919
138bc75d-0d04-0410-961f-
82ee72b054a4
2010-05-27 Maxim Kuvyrkov <maxim@codesourcery.com>
+ * gthr-posix.h (pthread_cancel): Don't declare if compiling against
+ Bionic C library.
+ (__gthread_active_p): Check for pthread_create if compiling against
+ Bionic C library.
+
+2010-05-27 Maxim Kuvyrkov <maxim@codesourcery.com>
+
Support compilation for Android platform. Reimplement -mandroid.
* config.gcc (*linux*): Include linux-android.h and linux-android.opt.
__gthrw(pthread_equal)
__gthrw(pthread_self)
__gthrw(pthread_detach)
+#ifndef __BIONIC__
__gthrw(pthread_cancel)
+#endif
__gthrw(sched_yield)
__gthrw(pthread_mutex_lock)
__gthread_active_p (void)
{
static void *const __gthread_active_ptr
- = __extension__ (void *) &__gthrw_(pthread_cancel);
+ = __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;
}