summaryrefslogtreecommitdiff
path: root/pthread/pt-alloc.c
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2016-09-21 00:05:53 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2016-09-21 00:05:53 +0200
commit1f32bdc2e2f54cf4279b720909ff9c2d64a1c406 (patch)
tree03761c564ebe347a2924667ac4b4d4fabbb58dfe /pthread/pt-alloc.c
parenta9d69ae8ab389dc9f47aef519dac4f422b4120ef (diff)
parent1d49ccdd73c182ad9f280d21d5a5e88bd59db871 (diff)
Merge branch 'master' into master-glibc-2.23
Diffstat (limited to 'pthread/pt-alloc.c')
-rw-r--r--pthread/pt-alloc.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/pthread/pt-alloc.c b/pthread/pt-alloc.c
index 4860f48..21063d5 100644
--- a/pthread/pt-alloc.c
+++ b/pthread/pt-alloc.c
@@ -139,7 +139,7 @@ __pthread_alloc (struct __pthread **pthread)
}
retry:
- pthread_rwlock_wrlock (&__pthread_threads_lock);
+ __pthread_rwlock_wrlock (&__pthread_threads_lock);
if (__pthread_num_threads < __pthread_max_threads)
{
@@ -148,7 +148,7 @@ __pthread_alloc (struct __pthread **pthread)
new->thread = 1 + __pthread_num_threads++;
__pthread_threads[new->thread - 1] = NULL;
- pthread_rwlock_unlock (&__pthread_threads_lock);
+ __pthread_rwlock_unlock (&__pthread_threads_lock);
*pthread = new;
return 0;
@@ -157,7 +157,7 @@ __pthread_alloc (struct __pthread **pthread)
else if (__pthread_num_threads >= PTHREAD_THREADS_MAX)
{
/* We have reached the limit on the number of threads per process. */
- pthread_rwlock_unlock (&__pthread_threads_lock);
+ __pthread_rwlock_unlock (&__pthread_threads_lock);
free (new);
return EAGAIN;
@@ -169,7 +169,7 @@ __pthread_alloc (struct __pthread **pthread)
memory allocation, since that's a potentially blocking operation. */
max_threads = __pthread_max_threads;
- pthread_rwlock_unlock (&__pthread_threads_lock);
+ __pthread_rwlock_unlock (&__pthread_threads_lock);
/* Allocate a new lookup table that's twice as large. */
new_max_threads
@@ -181,13 +181,13 @@ __pthread_alloc (struct __pthread **pthread)
return ENOMEM;
}
- pthread_rwlock_wrlock (&__pthread_threads_lock);
+ __pthread_rwlock_wrlock (&__pthread_threads_lock);
/* Check if nobody else has already enlarged the table. */
if (max_threads != __pthread_max_threads)
{
/* Yep, they did. */
- pthread_rwlock_unlock (&__pthread_threads_lock);
+ __pthread_rwlock_unlock (&__pthread_threads_lock);
/* Free the newly allocated table and try again to allocate a slot. */
free (threads);
@@ -210,7 +210,7 @@ __pthread_alloc (struct __pthread **pthread)
new->thread = 1 + __pthread_num_threads++;
__pthread_threads[new->thread - 1] = NULL;
- pthread_rwlock_unlock (&__pthread_threads_lock);
+ __pthread_rwlock_unlock (&__pthread_threads_lock);
free (old_threads);