summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2011-12-06 01:45:20 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2011-12-06 01:45:20 +0100
commit4f6cbf004dbc2e5b0d17f23cbf7569e94783952a (patch)
treea1fd5df453625ede8e3e47bfc8cc5a03c329bb22
parent15629adf11dd34e5607bb3ed5eaa6b604e762a60 (diff)
parentf115339ad63bfb0005bc3d1ebfb05e1a0aecc0db (diff)
Merge branch 'upstream-merged'
-rw-r--r--libpthread/pthread/cthreads-compat.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libpthread/pthread/cthreads-compat.c b/libpthread/pthread/cthreads-compat.c
index e0536ef2..cbe8170e 100644
--- a/libpthread/pthread/cthreads-compat.c
+++ b/libpthread/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);
}