about summary refs log tree commit diff
path: root/nptl/sysdeps/pthread/pthread_rwlock_timedwrlock.c
diff options
context:
space:
mode:
Diffstat (limited to 'nptl/sysdeps/pthread/pthread_rwlock_timedwrlock.c')
-rw-r--r--nptl/sysdeps/pthread/pthread_rwlock_timedwrlock.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/nptl/sysdeps/pthread/pthread_rwlock_timedwrlock.c b/nptl/sysdeps/pthread/pthread_rwlock_timedwrlock.c
index e4d08ea657..52308aff91 100644
--- a/nptl/sysdeps/pthread/pthread_rwlock_timedwrlock.c
+++ b/nptl/sysdeps/pthread/pthread_rwlock_timedwrlock.c
@@ -43,7 +43,7 @@ pthread_rwlock_timedwrlock (rwlock, abstime)
       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;
 	}
 
@@ -51,7 +51,7 @@ pthread_rwlock_timedwrlock (rwlock, abstime)
 	 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;