diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2020-02-10 23:06:33 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2020-02-11 00:32:44 +0100 |
commit | 8ba6ad703cb38ec57cdb473650ac289e5f8496d5 (patch) | |
tree | 843104571af29b6872721b6477d3b2e2444a3e96 /sysdeps/htl/sem-post.c | |
parent | cd7965bd970b0a298e734acc9dafae0a5db5f712 (diff) | |
download | glibc-8ba6ad703cb38ec57cdb473650ac289e5f8496d5.tar.gz glibc-8ba6ad703cb38ec57cdb473650ac289e5f8496d5.tar.xz glibc-8ba6ad703cb38ec57cdb473650ac289e5f8496d5.zip |
hurd: Add __pthread_spin_wait and use it
900778283ac3 ("htl: make pthread_spin_lock really spin") made pthread_spin_lock really spin and not block, but the current users of __pthread_spin_lock were assuming that it blocks, i.e. they use it as a lightweight mutex fitting in just one int. __pthread_spin_wait provides that support back.
Diffstat (limited to 'sysdeps/htl/sem-post.c')
-rw-r--r-- | sysdeps/htl/sem-post.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sysdeps/htl/sem-post.c b/sysdeps/htl/sem-post.c index 2e0be8fc49..fd0c6338c6 100644 --- a/sysdeps/htl/sem-post.c +++ b/sysdeps/htl/sem-post.c @@ -26,7 +26,7 @@ __sem_post (sem_t *sem) { struct __pthread *wakeup; - __pthread_spin_lock (&sem->__lock); + __pthread_spin_wait (&sem->__lock); if (sem->__value > 0) /* Do a quick up. */ { |