summaryrefslogtreecommitdiffstats
path: root/gcc/gthr-posix.h
diff options
context:
space:
mode:
authorjb <jb@138bc75d-0d04-0410-961f-82ee72b054a4>2008-03-01 10:46:31 +0000
committerjb <jb@138bc75d-0d04-0410-961f-82ee72b054a4>2008-03-01 10:46:31 +0000
commit1cd3a3444bb9ab510b126cb58982588287e61b74 (patch)
tree0a496ad8673e22a94b319a53eee147bd5fcac42a /gcc/gthr-posix.h
parenta2bdd6432ca7a2e629c7bbdef12ae5b75a8da5c2 (diff)
downloadppe42-gcc-1cd3a3444bb9ab510b126cb58982588287e61b74.tar.gz
ppe42-gcc-1cd3a3444bb9ab510b126cb58982588287e61b74.zip
gcc:
2008-03-01 Janne Blomqvist <jb@gcc.gnu.org> PR gcc/35063 * gthr.h: Add __gthread_mutex_destroy as a function that must be implemented. * gthr-vxworks.h (__gthread_mutex_destroy): Null implementation. * gthr-single.h (__gthread_mutex_destroy): Likewise. * gthr-rtems.h (__gthread_mutex_destroy): Likewise. * gthr-mipssde.h (__gthread_mutex_destroy): Likewise. * gthr-nks.h (__gthread_mutex_destroy): Likewise. * gthr-solaris.h (__gthread_mutex_destroy): Call mutex_destroy. * gthr-win32.h (__GTHREAD_MUTEX_DESTROY_FUNCTION): Remove. (__gthread_mutex_destroy_function): Rename to __gthread_mutex_destroy. * gthr-dce.h (__gthread_mutex_destroy): Call pthread_mutex_destroy. * gthr-tpf.h (__gthread_mutex_destroy): Likewise. * gthr-posix.h (__gthread_mutex_destroy): Likewise. * gthr-posix95.h (__gthread_mutex_destroy): Likewise. libgfortran: 2008-03-01 Janne Blomqvist <jb@gcc.gnu.org> PR libfortran/35063 * io/unit.c (destroy_unit_mutex): Call __gthread_mutex_destroy instead of macro kludge. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@132800 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gthr-posix.h')
-rw-r--r--gcc/gthr-posix.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/gthr-posix.h b/gcc/gthr-posix.h
index ad6822e26ad..b0c9ebbc370 100644
--- a/gcc/gthr-posix.h
+++ b/gcc/gthr-posix.h
@@ -94,6 +94,7 @@ __gthrw3(pthread_mutex_lock)
__gthrw3(pthread_mutex_trylock)
__gthrw3(pthread_mutex_unlock)
__gthrw3(pthread_mutex_init)
+__gthrw3(pthread_mutex_destroy)
__gthrw3(pthread_cond_broadcast)
__gthrw3(pthread_cond_wait)
#else
@@ -106,6 +107,7 @@ __gthrw(pthread_mutex_lock)
__gthrw(pthread_mutex_trylock)
__gthrw(pthread_mutex_unlock)
__gthrw(pthread_mutex_init)
+__gthrw(pthread_mutex_destroy)
__gthrw(pthread_cond_broadcast)
__gthrw(pthread_cond_wait)
#endif
@@ -677,6 +679,15 @@ __gthread_setspecific (__gthread_key_t key, const void *ptr)
}
static inline int
+__gthread_mutex_destroy (__gthread_mutex_t *mutex)
+{
+ if (__gthread_active_p ())
+ return __gthrw_(pthread_mutex_destroy) (mutex);
+ else
+ return 0;
+}
+
+static inline int
__gthread_mutex_lock (__gthread_mutex_t *mutex)
{
if (__gthread_active_p ())
OpenPOWER on IntegriCloud