summaryrefslogtreecommitdiff
path: root/gcc/gthr-posix95.h
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2008-03-02 19:28:05 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2008-03-02 19:28:05 +0000
commit9d63dbe6b454a33381a73e1ca93aff85b0594f05 (patch)
treef8a1cb507af3e7ceb424d8056fc0f50558e9cd28 /gcc/gthr-posix95.h
parentf98abc094eceacf320655d4f16c9f71243455544 (diff)
downloadgcc-9d63dbe6b454a33381a73e1ca93aff85b0594f05.tar.gz
2008-03-02 Basile Starynkevitch <basile@starynkevitch.net>
merged with trunk 132817 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@132818 138bc75d-0d04-0410-961f-82ee72b054a4
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 ())