diff options
Diffstat (limited to 'nptl/pthread_mutex_trylock.c')
-rw-r--r-- | nptl/pthread_mutex_trylock.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/nptl/pthread_mutex_trylock.c b/nptl/pthread_mutex_trylock.c index 394a9cba9b..c61d7d5852 100644 --- a/nptl/pthread_mutex_trylock.c +++ b/nptl/pthread_mutex_trylock.c @@ -26,14 +26,14 @@ int __pthread_mutex_trylock (mutex) pthread_mutex_t *mutex; { - struct pthread *pd = THREAD_SELF; + struct pthread *id = THREAD_ID; switch (__builtin_expect (mutex->__data.__kind, PTHREAD_MUTEX_TIMED_NP)) { /* Recursive mutex. */ case PTHREAD_MUTEX_RECURSIVE_NP: /* Check whether we already hold the mutex. */ - if (mutex->__data.__owner == pd) + if (mutex->__data.__owner == id) { /* Just bump the counter. */ if (__builtin_expect (mutex->__data.__count + 1 == 0, 0)) @@ -47,7 +47,7 @@ __pthread_mutex_trylock (mutex) if (lll_mutex_trylock (mutex->__data.__lock) == 0) { /* Record the ownership. */ - mutex->__data.__owner = pd; + mutex->__data.__owner = id; mutex->__data.__count = 1; return 0; } @@ -63,7 +63,7 @@ __pthread_mutex_trylock (mutex) if (lll_mutex_trylock (mutex->__data.__lock) == 0) { /* Record the ownership. */ - mutex->__data.__owner = pd; + mutex->__data.__owner = id; return 0; } |