diff options
author | Ranjit Mathew <rmathew@hotmail.com> | 2005-01-17 14:17:41 +0000 |
---|---|---|
committer | Ranjit Mathew <rmathew@gcc.gnu.org> | 2005-01-17 14:17:41 +0000 |
commit | 658acbb2879a50a76ef85954d942788053aeb1a1 (patch) | |
tree | 6237706efe80abda4c5d24f91ae1f6b303b5345f /gcc/gthr-posix.h | |
parent | ac317859d409434b0f5ef8ec89a7abcacb10bd3e (diff) | |
download | gcc-658acbb2879a50a76ef85954d942788053aeb1a1.tar.gz |
gthr-posix.h (__gthread_active_p): Use pthread_cancel instead of pthread_create to find out if threads are enabled.
* 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.
From-SVN: r93762
Diffstat (limited to 'gcc/gthr-posix.h')
-rw-r--r-- | gcc/gthr-posix.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/gthr-posix.h b/gcc/gthr-posix.h index 7cab6149f24..9b56b5aec51 100644 --- a/gcc/gthr-posix.h +++ b/gcc/gthr-posix.h @@ -1,6 +1,6 @@ /* Threads compatibility routines for libgcc2 and libobjc. */ /* Compile this one with gcc. */ -/* Copyright (C) 1997, 1999, 2000, 2001, 2002, 2003, 2004 +/* Copyright (C) 1997, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This file is part of GCC. @@ -66,6 +66,7 @@ typedef pthread_mutex_t __gthread_recursive_mutex_t; #pragma weak pthread_getspecific #pragma weak pthread_setspecific #pragma weak pthread_create +#pragma weak pthread_cancel #pragma weak pthread_mutex_lock #pragma weak pthread_mutex_trylock @@ -106,7 +107,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; } |