diff options
Diffstat (limited to 'nptl/sysdeps/pthread/pthread_rwlock_wrlock.c')
-rw-r--r-- | nptl/sysdeps/pthread/pthread_rwlock_wrlock.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/nptl/sysdeps/pthread/pthread_rwlock_wrlock.c b/nptl/sysdeps/pthread/pthread_rwlock_wrlock.c index 03c37a1933..171a14adb1 100644 --- a/nptl/sysdeps/pthread/pthread_rwlock_wrlock.c +++ b/nptl/sysdeps/pthread/pthread_rwlock_wrlock.c @@ -40,7 +40,7 @@ __pthread_rwlock_wrlock (rwlock) if (rwlock->__data.__writer == 0 && rwlock->__data.__nr_readers == 0) { /* Mark self as writer. */ - rwlock->__data.__writer = (pthread_t) THREAD_SELF; + rwlock->__data.__writer = (pthread_t) THREAD_ID; break; } @@ -48,7 +48,7 @@ __pthread_rwlock_wrlock (rwlock) a deadlock situation we recognize and report. */ if (rwlock->__data.__writer != 0 && __builtin_expect (rwlock->__data.__writer - == (pthread_t) THREAD_SELF, 0)) + == (pthread_t) THREAD_ID, 0)) { result = EDEADLK; break; |