diff options
Diffstat (limited to 'lib/libthr/thread/thr_private.h')
-rw-r--r-- | lib/libthr/thread/thr_private.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/libthr/thread/thr_private.h b/lib/libthr/thread/thr_private.h index 7c1d005..9b306a0 100644 --- a/lib/libthr/thread/thr_private.h +++ b/lib/libthr/thread/thr_private.h @@ -275,8 +275,10 @@ struct pthread_rwlock { pthread_mutex_t lock; /* monitor lock */ pthread_cond_t read_signal; pthread_cond_t write_signal; - int state; /* 0 = idle >0 = # of readers -1 = writer */ + volatile int32_t state; int blocked_writers; + int blocked_readers; + struct pthread *owner; }; /* @@ -673,6 +675,8 @@ void _thread_bp_death(void); int _sched_yield(void); int _pthread_getaffinity_np(pthread_t, size_t, cpuset_t *); int _pthread_setaffinity_np(pthread_t, size_t, const cpuset_t *); +int _pthread_cond_wait_unlocked(pthread_cond_t *, pthread_mutex_t *, const struct timespec *) __hidden; +int _pthread_cond_broadcast_unlock(pthread_cond_t *, pthread_mutex_t *, int broadcast); /* #include <fcntl.h> */ #ifdef _SYS_FCNTL_H_ |