* thread.cc (pthread_rwlock::lookup_reader): Remove parameter: always assume

that we're looking for the current thread.
(pthread_rwlock::tryrdlock): Eliminate self variable.  Accommodate change in
lookup_reader().
(pthread_rwlock::unlock): Ditto.
(pthread_rwlock::rdlock): Ditto.  Move add_reader call after writer tests to
more closely mimic old behavior.
(pthread_rwlock::wrlock): Accommodate change in lookup_reader().
* thread.h ((pthread_rwlock::lookup_reader): Eliminate argument.
This commit is contained in:
Christopher Faylor
2013-01-07 19:34:44 +00:00
parent d5446858b5
commit 98f16610ca
3 changed files with 29 additions and 20 deletions

View File

@@ -1,7 +1,7 @@
/* thread.h: Locking and threading module definitions
Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007,
2008, 2009, 2010, 2011, 2012 Red Hat, Inc.
2008, 2009, 2010, 2011, 2012, 2013 Red Hat, Inc.
This file is part of Cygwin.
@@ -586,7 +586,7 @@ private:
RWLOCK_READER *add_reader ();
void remove_reader (struct RWLOCK_READER *rd);
struct RWLOCK_READER *lookup_reader (pthread_t thread);
struct RWLOCK_READER *lookup_reader ();
void release ()
{