diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2009-01-20 12:40:31 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2009-01-20 12:40:31 +0000 |
commit | f8190b57056cc10ec0da28b0685ec6fe59b1e4cb (patch) | |
tree | 5a4289b8199ac2262c411f0f08f3941f37ca5feb /winsup/cygwin/thread.h | |
parent | 3787b37ef2c8a86a1c67ccef6dde3df568ed5ae9 (diff) | |
download | cygnal-f8190b57056cc10ec0da28b0685ec6fe59b1e4cb.tar.gz cygnal-f8190b57056cc10ec0da28b0685ec6fe59b1e4cb.tar.bz2 cygnal-f8190b57056cc10ec0da28b0685ec6fe59b1e4cb.zip |
* 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.h | 1 |
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; |