From 4ad0bbf4fa2073b8b2cb81866f68ff3e8c503174 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 5 Jun 2003 19:31:57 +0000 Subject: Update. 2003-06-05 Ulrich Drepper * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t): Change type of __writer element to int. * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise. * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise. * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise. * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry. * sysdeps/x86_64/tcb-offsets.sym: Likewise. * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer. Compare with TID to determine deadlocks. * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise. * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise. * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise. * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise. * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise. * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: Likewise. * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S: Likewise. * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise. * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise. * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Likewise. * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: Likewise. * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise. * Makefile (tests): Add tst-rwlock12. * tst-rwlock12.c: New file. --- nptl/pthread_rwlock_trywrlock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nptl/pthread_rwlock_trywrlock.c') diff --git a/nptl/pthread_rwlock_trywrlock.c b/nptl/pthread_rwlock_trywrlock.c index 755af37..b754a19 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; } -- cgit v1.1