aboutsummaryrefslogtreecommitdiff
path: root/nptl
diff options
context:
space:
mode:
authorRoland McGrath <roland@hack.frob.com>2014-07-10 10:57:57 -0700
committerRoland McGrath <roland@hack.frob.com>2014-07-10 10:57:57 -0700
commit887865fcfab05939dabec78f5ad358d0283602d3 (patch)
tree91b4182f7d892a8bb784c8ac9f9caba22117387e /nptl
parent585367266923156ac6fb789939a923641ba5aaf4 (diff)
downloadglibc-887865fcfab05939dabec78f5ad358d0283602d3.zip
glibc-887865fcfab05939dabec78f5ad358d0283602d3.tar.gz
glibc-887865fcfab05939dabec78f5ad358d0283602d3.tar.bz2
Get rid of lll_robust_trylock.
Diffstat (limited to 'nptl')
-rw-r--r--nptl/pthread_mutex_trylock.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/nptl/pthread_mutex_trylock.c b/nptl/pthread_mutex_trylock.c
index e46f22c..0867b06 100644
--- a/nptl/pthread_mutex_trylock.c
+++ b/nptl/pthread_mutex_trylock.c
@@ -72,7 +72,7 @@ __pthread_mutex_trylock (mutex)
elision:
if (lll_trylock_elision (mutex->__data.__lock,
mutex->__data.__elision) != 0)
- break;
+ break;
/* Don't record the ownership. */
return 0;
@@ -159,7 +159,8 @@ __pthread_mutex_trylock (mutex)
}
}
- oldval = lll_robust_trylock (mutex->__data.__lock, id);
+ oldval = atomic_compare_and_exchange_val_acq (&mutex->__data.__lock,
+ id, 0);
if (oldval != 0 && (oldval & FUTEX_OWNER_DIED) == 0)
{
THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, NULL);