]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gthr-posix.h (__gthread_active_p): Use pthread_cancel instead of pthread_create to...
authorRanjit Mathew <rmathew@hotmail.com>
Mon, 17 Jan 2005 14:17:41 +0000 (14:17 +0000)
committerRanjit Mathew <rmathew@gcc.gnu.org>
Mon, 17 Jan 2005 14:17:41 +0000 (14:17 +0000)
* 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

gcc/ChangeLog
gcc/gthr-posix.h
gcc/gthr-posix95.h

index 0076ff5f0d681fdf96138d76ae614330cc849c9a..47d6a63be079da9e9cdd964f7186e59f60e3db8d 100644 (file)
@@ -1,3 +1,9 @@
+2005-01-17  Ranjit Mathew  <rmathew@hotmail.com>
+
+       * 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.
+
 2005-01-17  Ira Rosen  <irar@il.ibm.com>
 
        * fortran/f95-lang.c (gfc_init_builtin_functions): Call
index 7cab6149f249a4164cb794dbc9bcd9fb126da2be..9b56b5aec51176b2076814f6df5766567b6f3ad5 100644 (file)
@@ -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;
 }
 
index f10317dd291df4982d0cd8b2be6ce979dd15e58a..b0bd1325b813cb9e85b25353ad049d880b8a476a 100644 (file)
@@ -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;
 }