[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[SCM] Debian GNU Hurd packaging branch, libpthread, updated. upstream/li
From: |
Samuel Thibault |
Subject: |
[SCM] Debian GNU Hurd packaging branch, libpthread, updated. upstream/libpthread/20111106-2-gdb7bf95 |
Date: |
Mon, 05 Dec 2011 01:45:45 +0000 |
The following commit has been merged in the libpthread branch:
commit db7bf9590dc08a72de9a9c46db7937188156fa2e
Author: Samuel Thibault <address@hidden>
Date: Sun Nov 27 18:39:25 2011 +0100
Fix __mutex_unlock_solid safety
libc releases the spinlock before calling __mutex_unlock_solid, so we have
to
try to reacquire it before possibly giving it to some blocked thread.
* pthread/cthreads-compat.c (__mutex_unlock_solid): Call
__pthread_spin_trylock before calling __pthread_mutex_unlock.
diff --git a/pthread/cthreads-compat.c b/pthread/cthreads-compat.c
index e0536ef..cbe8170 100644
--- a/pthread/cthreads-compat.c
+++ b/pthread/cthreads-compat.c
@@ -100,5 +100,8 @@ __mutex_lock_solid (void *lock)
void
__mutex_unlock_solid (void *lock)
{
+ if (__pthread_spin_trylock (lock) != 0)
+ /* Somebody already got the lock, that one will manage waking up others */
+ return;
__pthread_mutex_unlock (lock);
}
--
Debian GNU Hurd packaging
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [SCM] Debian GNU Hurd packaging branch, libpthread, updated. upstream/libpthread/20111106-2-gdb7bf95,
Samuel Thibault <=