summaryrefslogtreecommitdiff
path: root/gcc/gthr-posix95.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-posix95.h
parenta2bdd6432ca7a2e629c7bbdef12ae5b75a8da5c2 (diff)
downloadgcc-1cd3a3444bb9ab510b126cb58982588287e61b74.tar.gz
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-posix95.h')
-rw-r--r--gcc/gthr-posix95.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/gcc/gthr-posix95.h b/gcc/gthr-posix95.h
index eb54c925f6f..d993c1309af 100644
--- a/gcc/gthr-posix95.h
+++ b/gcc/gthr-posix95.h
@@ -80,13 +80,14 @@ __gthrw(pthread_create)
__gthrw(pthread_cancel)
__gthrw(pthread_self)
+__gthrw(pthread_mutex_init)
+__gthrw(pthread_mutex_destroy)
__gthrw(pthread_mutex_lock)
__gthrw(pthread_mutex_trylock)
__gthrw(pthread_mutex_unlock)
__gthrw(pthread_mutexattr_init)
__gthrw(pthread_mutexattr_destroy)
-__gthrw(pthread_mutex_init)
__gthrw(pthread_cond_broadcast)
__gthrw(pthread_cond_wait)
@@ -640,6 +641,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 ())