aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Sayle <roger@eyesopen.com>2006-07-23 20:14:44 +0000
committerRoger Sayle <sayle@gcc.gnu.org>2006-07-23 20:14:44 +0000
commit74e55d0f8f791d71aa4ac10215126e74277177d1 (patch)
treeed26ed5af6f849ef8b96d7e4bd4a0f12d4f4338b
parentd88259d140c0f82745f460e659b0266fa3eb67f7 (diff)
downloadgcc-74e55d0f8f791d71aa4ac10215126e74277177d1.zip
gcc-74e55d0f8f791d71aa4ac10215126e74277177d1.tar.gz
gcc-74e55d0f8f791d71aa4ac10215126e74277177d1.tar.bz2
re PR target/28247 (libstdc++ cannot be build with Solaris threads)
PR target/28247 * gthr-solaris.h: Prototype __gthrw forms of thr_self, mutex_init and mutex_destroy even when !_LIBOOBJC. Remove duplicate prototype of the __gthrw form of thr_keycreate. (__gthread_key_delete): Silence the unused argument warning. From-SVN: r115686
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/gthr-solaris.h19
2 files changed, 21 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index d52141a..995e399 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,11 @@
+2006-07-23 Roger Sayle <roger@eyesopen.com>
+
+ PR target/28247
+ * gthr-solaris.h: Prototype __gthrw forms of thr_self, mutex_init and
+ mutex_destroy even when !_LIBOOBJC. Remove duplicate prototype of
+ the __gthrw form of thr_keycreate.
+ (__gthread_key_delete): Silence the unused argument warning.
+
2006-07-23 Steven Bosscher <steven@gcc.gnu.org>
PR debug/25468
diff --git a/gcc/gthr-solaris.h b/gcc/gthr-solaris.h
index f0d5d1e..5665ecd 100644
--- a/gcc/gthr-solaris.h
+++ b/gcc/gthr-solaris.h
@@ -1,6 +1,6 @@
/* Threads compatibility routines for libgcc2 and libobjc. */
/* Compile this one with gcc. */
-/* Copyright (C) 1997, 1999, 2000, 2004, 2005
+/* Copyright (C) 1997, 1999, 2000, 2004, 2005, 2006
Free Software Foundation, Inc.
This file is part of GCC.
@@ -39,6 +39,12 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include <thread.h>
#include <errno.h>
+#ifdef __cplusplus
+#define UNUSED(x)
+#else
+#define UNUSED(x) x __attribute__((unused))
+#endif
+
typedef thread_key_t __gthread_key_t;
typedef struct {
mutex_t mutex;
@@ -69,16 +75,17 @@ __gthrw(thr_keycreate)
__gthrw(thr_getspecific)
__gthrw(thr_setspecific)
__gthrw(thr_create)
+__gthrw(thr_self)
+__gthrw(mutex_init)
+__gthrw(mutex_destroy)
__gthrw(mutex_lock)
__gthrw(mutex_trylock)
__gthrw(mutex_unlock)
#ifdef _LIBOBJC
__gthrw(thr_exit)
-__gthrw(thr_keycreate)
__gthrw(thr_getprio)
-__gthrw(thr_self)
__gthrw(thr_setprio)
__gthrw(thr_yield)
@@ -88,8 +95,6 @@ __gthrw(cond_wait)
__gthrw(cond_broadcast)
__gthrw(cond_signal)
-__gthrw(mutex_init)
-__gthrw(mutex_destroy)
#endif
#if SUPPORTS_WEAK && GTHREAD_USE_WEAK
@@ -434,7 +439,7 @@ __gthread_key_create (__gthread_key_t *key, void (*dtor) (void *))
}
static inline int
-__gthread_key_delete (__gthread_key_t key)
+__gthread_key_delete (__gthread_key_t UNUSED (key))
{
/* Not possible. */
return -1;
@@ -544,4 +549,6 @@ __gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *mutex)
#endif /* _LIBOBJC */
+#undef UNUSED
+
#endif /* ! GCC_GTHR_SOLARIS_H */