diff options
author | rmathew <rmathew@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-01-17 14:17:41 +0000 |
---|---|---|
committer | rmathew <rmathew@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-01-17 14:17:41 +0000 |
commit | 1df26a485eb2ccb027d28907f43f8cb4b8986ce2 (patch) | |
tree | 6237706efe80abda4c5d24f91ae1f6b303b5345f /gcc/gthr-posix95.h | |
parent | 56448917e5645809e6760973710fd6ddd511b3cc (diff) | |
download | gcc-1df26a485eb2ccb027d28907f43f8cb4b8986ce2.tar.gz |
* gthr-posix.h (__gthread_active_p): Use pthread_cancel instead
of pthread_create to find out if threads are enabled.
* gthr-posix95.h (__gthread_active_p): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@93762 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gthr-posix95.h')
-rw-r--r-- | gcc/gthr-posix95.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/gthr-posix95.h b/gcc/gthr-posix95.h index f10317dd291..b0bd1325b81 100644 --- a/gcc/gthr-posix95.h +++ b/gcc/gthr-posix95.h @@ -1,6 +1,6 @@ /* Threads compatibility routines for libgcc2 and libobjc. */ /* Compile this one with gcc. */ -/* Copyright (C) 2004 Free Software Foundation, Inc. +/* Copyright (C) 2004, 2005 Free Software Foundation, Inc. This file is part of GCC. @@ -64,6 +64,7 @@ typedef struct { #pragma weak pthread_getspecific #pragma weak pthread_setspecific #pragma weak pthread_create +#pragma weak pthread_cancel #pragma weak pthread_self #pragma weak pthread_mutex_lock @@ -105,7 +106,7 @@ static inline int __gthread_active_p (void) { static void *const __gthread_active_ptr - = __extension__ (void *) &pthread_create; + = __extension__ (void *) &pthread_cancel; return __gthread_active_ptr != 0; } |