summaryrefslogtreecommitdiff
path: root/pthread/cthreads-compat.c
diff options
context:
space:
mode:
authorThomas Schwinge <thomas@codesourcery.com>2012-08-30 23:31:39 +0200
committerThomas Schwinge <thomas@codesourcery.com>2012-08-30 23:31:39 +0200
commit16a92d2765c5732abb64742cb5d387148e0ac629 (patch)
treeabbbadbf54f87eed25f71a312e43ce7f7cb7adfe /pthread/cthreads-compat.c
parent9a231435f830c459c0e214c2b99877e2ed6edb56 (diff)
parent0096579c8bea920f7c42b40ea22db621da6480a5 (diff)
Merge commit 'refs/top-bases/t/fix_inline' into t/fix_inlinet/fix_inline
Conflicts: sysdeps/l4/hurd/pt-sysdep.h
Diffstat (limited to 'pthread/cthreads-compat.c')
-rw-r--r--pthread/cthreads-compat.c3
1 files changed, 3 insertions, 0 deletions
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);
}