summaryrefslogtreecommitdiffstats
path: root/lib/libkse/thread/thr_private.h
diff options
context:
space:
mode:
authoralex <alex@FreeBSD.org>1998-09-07 19:01:43 +0000
committeralex <alex@FreeBSD.org>1998-09-07 19:01:43 +0000
commitfe02148d3f8adf07ccb0cd4f4491ed4eadc9a710 (patch)
treebe26836ebbbdc58cff84aa54c1c720ab317da73d /lib/libkse/thread/thr_private.h
parent06f84d5212709c1fffd29e99fe45de2c81683197 (diff)
downloadFreeBSD-src-fe02148d3f8adf07ccb0cd4f4491ed4eadc9a710.zip
FreeBSD-src-fe02148d3f8adf07ccb0cd4f4491ed4eadc9a710.tar.gz
Implement pthread read/write locks as defined by Version 2 of the Single
UNIX Specification. As with our standard mutexes, process shared locks are not supported at this time.
Diffstat (limited to 'lib/libkse/thread/thr_private.h')
-rw-r--r--lib/libkse/thread/thr_private.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/libkse/thread/thr_private.h b/lib/libkse/thread/thr_private.h
index 39ce14d..5b76a86 100644
--- a/lib/libkse/thread/thr_private.h
+++ b/lib/libkse/thread/thr_private.h
@@ -224,6 +224,18 @@ struct pthread_key {
void (*destructor) ();
};
+struct pthread_rwlockattr {
+ int pshared;
+};
+
+struct pthread_rwlock {
+ pthread_mutex_t lock; /* monitor lock */
+ int state; /* 0 = idle >0 = # of readers -1 = writer */
+ pthread_cond_t read_signal;
+ pthread_cond_t write_signal;
+ int blocked_writers;
+};
+
/*
* Thread states.
*/
OpenPOWER on IntegriCloud