summaryrefslogtreecommitdiff
path: root/gcc/gthr-posix95.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/gthr-posix95.h')
-rw-r--r--gcc/gthr-posix95.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/gcc/gthr-posix95.h b/gcc/gthr-posix95.h
index eb54c925f6f..625f799e8fc 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)
@@ -96,7 +97,6 @@ __gthrw(pthread_cond_destroy)
__gthrw(pthread_cond_init)
__gthrw(pthread_cond_signal)
__gthrw(pthread_exit)
-__gthrw(pthread_mutex_destroy)
#ifdef _POSIX_PRIORITY_SCHEDULING
#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING
__gthrw(sched_get_priority_max)
@@ -640,6 +640,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 ())