From a87bf9a8eab3af79798131b60c1f7f92f995df8c Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Mon, 19 Sep 2016 01:44:07 +0200 Subject: Fix exposition of pthread functions * pthread/pt-alloc.c (__pthread_alloc): Use __pthread_rwlock_wrlock and __pthread_rwlock_unlock instead of pthread_rwlock_wrlock and pthread_rwlock_unlock. * pthread/pt-create.c (__pthread_create_internal): Use__pthread_rwlock_rdlock and __pthread_rwlock_unlock instead of pthread_rwlock_rdlock and pthread_rwlock_unlock. * pthread/pt-dealloc.c (__pthread_dealloc): Use __pthread_cond_broadcast, __pthread_mutex_lock, and __pthread_mutex_unlock instead of pthread_cond_broadcast, pthread_mutex_lock, and pthread_mutex_unlock * pthread/pt-exit.c (__pthread_exit): Use __pthread_setcancelstate and __pthread_cond_broadcast instead of pthread_setcancelstate and pthread_cond_broadcast. * pthread/pt-internal.h (__pthread_getid, __pthread_setid): Use __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and __pthread_rwlock_unlock instead of pthread_rwlock_rdlock, pthread_rwlock_wrlock, and pthread_rwlock_unlock * pthread/pt-join.c (pthread_join): Use __pthread_cond_wait instead of pthread_cond_wait. * sysdeps/hurd/pt-key-delete.c (pthread_key_delete): Use __pthread_rwlock_rdlock and __pthread_rwlock_unlock instead of pthread_rwlock_rdlock and pthread_rwlock_unlock. --- pthread/pt-create.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pthread/pt-create.c') diff --git a/pthread/pt-create.c b/pthread/pt-create.c index 417605a..c9e0730 100644 --- a/pthread/pt-create.c +++ b/pthread/pt-create.c @@ -202,9 +202,9 @@ __pthread_create_internal (struct __pthread **thread, could use __thread_setid, however, we only lock for reading as no other thread should be using this entry (we also assume that the store is atomic). */ - pthread_rwlock_rdlock (&__pthread_threads_lock); + __pthread_rwlock_rdlock (&__pthread_threads_lock); __pthread_threads[pthread->thread - 1] = pthread; - pthread_rwlock_unlock (&__pthread_threads_lock); + __pthread_rwlock_unlock (&__pthread_threads_lock); /* At this point it is possible to guess our pthread ID. We have to make sure that all functions taking a pthread_t argument can -- cgit v1.2.3