about summary refs log tree commit diff
path: root/nptl/pthread_rwlock_trywrlock.c
diff options
context:
space:
mode:
Diffstat (limited to 'nptl/pthread_rwlock_trywrlock.c')
-rw-r--r--nptl/pthread_rwlock_trywrlock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/nptl/pthread_rwlock_trywrlock.c b/nptl/pthread_rwlock_trywrlock.c
index 755af37330..b754a19565 100644
--- a/nptl/pthread_rwlock_trywrlock.c
+++ b/nptl/pthread_rwlock_trywrlock.c
@@ -32,7 +32,7 @@ __pthread_rwlock_trywrlock (rwlock)
 
   if (rwlock->__data.__writer == 0 && rwlock->__data.__nr_readers == 0)
     {
-      rwlock->__data.__writer = (pthread_t) THREAD_ID;
+      rwlock->__data.__writer = THREAD_GETMEM (THREAD_SELF, tid);
       result = 0;
     }