summaryrefslogtreecommitdiff
path: root/libpthread/pthread
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2011-12-06 01:42:34 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2011-12-06 01:42:34 +0100
commita6910ad7c5061c73966d949c9fad2765332ee633 (patch)
tree4fe9e0a4b181aef5e3617a4a5131c2aeb91edff4 /libpthread/pthread
parent546aa048216ceb8e08f077946fdbf2acf12c91d2 (diff)
parentcb8b53b9961543d9069284eedbe89abfc1d7713b (diff)
Merge branch 'libpthread' into libpthread-moved
Diffstat (limited to 'libpthread/pthread')
-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);
}