summaryrefslogtreecommitdiff
path: root/winsup/cygwin/thread.h
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/thread.h')
-rw-r--r--winsup/cygwin/thread.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/winsup/cygwin/thread.h b/winsup/cygwin/thread.h
index 05638d9c62b..e162b32a047 100644
--- a/winsup/cygwin/thread.h
+++ b/winsup/cygwin/thread.h
@@ -438,6 +438,11 @@ public:
virtual unsigned long getsequence_np();
+ static int equal (pthread_t t1, pthread_t t2)
+ {
+ return t1 == t2;
+ }
+
private:
DWORD thread_id;
__pthread_cleanup_handler *cleanup_stack;
@@ -587,6 +592,18 @@ private:
void remove_reader (struct RWLOCK_READER *rd);
struct RWLOCK_READER *lookup_reader (pthread_t thread);
+ void release ()
+ {
+ if (waiting_writers)
+ {
+ if (!readers)
+ cond_writers.unblock (false);
+ }
+ else if (waiting_readers)
+ cond_readers.unblock (true);
+ }
+
+
static void rdlock_cleanup (void *arg);
static void wrlock_cleanup (void *arg);