summaryrefslogtreecommitdiff
path: root/pthread/cthreads-compat.c
diff options
context:
space:
mode:
authorThomas Schwinge <thomas@codesourcery.com>2012-08-30 23:29:21 +0200
committerThomas Schwinge <thomas@codesourcery.com>2012-08-30 23:29:21 +0200
commit6b1ebd29a16f2c2c91f8fcae4ce2b5dd62143821 (patch)
tree026e82163d438015f9fe828e16a174ee1a405803 /pthread/cthreads-compat.c
parent13aeb1df3614cbb0c0dc074427ab2f95160af0bb (diff)
parent0096579c8bea920f7c42b40ea22db621da6480a5 (diff)
Merge commit 'refs/top-bases/t/fix_have_kernel_resources' into t/fix_have_kernel_resourcest/fix_have_kernel_resources
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);
}