diff options
Diffstat (limited to 'lib/libthr/thread/thr_private.h')
-rw-r--r-- | lib/libthr/thread/thr_private.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/libthr/thread/thr_private.h b/lib/libthr/thread/thr_private.h index 7a7412b..c2bea3f 100644 --- a/lib/libthr/thread/thr_private.h +++ b/lib/libthr/thread/thr_private.h @@ -423,6 +423,15 @@ struct pthread_specific_elem { int seqno; }; +struct rwlock_held { + LIST_ENTRY(rwlock_held) rh_link; + struct pthread_rwlock *rh_rwlock; + int rh_rdcount; + int rh_wrcount; +}; + +LIST_HEAD(rwlock_listhead, rwlock_held); + /* * Thread structure. */ @@ -562,6 +571,13 @@ struct pthread { */ TAILQ_HEAD(, pthread_mutex) mutexq; + /* + * List of read-write locks owned for reading _OR_ writing. + * This is accessed only by the current thread, so there's + * no need for mutual exclusion. + */ + struct rwlock_listhead *rwlockList; + void *ret; struct pthread_specific_elem *specific; int specific_data_count; |