summaryrefslogtreecommitdiff
path: root/pthread/cthreads-compat.c
diff options
context:
space:
mode:
authorThomas Schwinge <thomas@codesourcery.com>2012-08-30 23:29:02 +0200
committerThomas Schwinge <thomas@codesourcery.com>2012-08-30 23:29:02 +0200
commit0096579c8bea920f7c42b40ea22db621da6480a5 (patch)
tree13624908cf430569082784ade52d97b94de8762c /pthread/cthreads-compat.c
parentd3f9d546c97402cd7d039fb6f3e3242327805784 (diff)
parent640cfa0a4af3dc399bff496fd94081a99dbbcdd2 (diff)
Merge commit 'refs/top-bases/baseline' into baselinebaseline
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);
}