Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2009-01-20 15:40:31 +0300
committerCorinna Vinschen <corinna@vinschen.de>2009-01-20 15:40:31 +0300
commitf8190b57056cc10ec0da28b0685ec6fe59b1e4cb (patch)
tree5a4289b8199ac2262c411f0f08f3941f37ca5feb /winsup/cygwin/thread.h
parent3787b37ef2c8a86a1c67ccef6dde3df568ed5ae9 (diff)
* 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.
Diffstat (limited to 'winsup/cygwin/thread.h')
-rw-r--r--winsup/cygwin/thread.h1
1 files changed, 1 insertions, 0 deletions
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;