From f8190b57056cc10ec0da28b0685ec6fe59b1e4cb Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 20 Jan 2009 12:40:31 +0000 Subject: * thread.h (struct pthread_rwlock::RWLOCK_READER): Add counter n. * thread.cc (pthread_rwlock::rdlock): If a thread already owns a read lock, just count the number of locks for it, per SUSv4. (pthread_rwlock::tryrdlock): Ditto. (pthread_rwlock::unlock): If a thread has more than one concurrent read locks, just count down. --- winsup/cygwin/thread.h | 1 + 1 file changed, 1 insertion(+) (limited to 'winsup/cygwin/thread.h') diff --git a/winsup/cygwin/thread.h b/winsup/cygwin/thread.h index db94fd2c2..c2a1be8f1 100644 --- a/winsup/cygwin/thread.h +++ b/winsup/cygwin/thread.h @@ -556,6 +556,7 @@ public: { struct RWLOCK_READER *next; pthread_t thread; + unsigned long n; } *readers; fast_mutex readers_mx; -- cgit v1.2.3