diff options
author | davidxu <davidxu@FreeBSD.org> | 2006-12-04 14:20:41 +0000 |
---|---|---|
committer | davidxu <davidxu@FreeBSD.org> | 2006-12-04 14:20:41 +0000 |
commit | cbb0fd817469a7d2bc7e1fb808addd5ca1dbfbfd (patch) | |
tree | a26172ec91f9000244f9da29bce3919b9abbd391 /lib/libthr/thread/thr_private.h | |
parent | 22a81fc246efb2668eddcb6ccd27129feaa5910c (diff) | |
download | FreeBSD-src-cbb0fd817469a7d2bc7e1fb808addd5ca1dbfbfd.zip FreeBSD-src-cbb0fd817469a7d2bc7e1fb808addd5ca1dbfbfd.tar.gz |
Use kernel provided userspace condition variable to implement pthread
condition variable.
Diffstat (limited to 'lib/libthr/thread/thr_private.h')
-rw-r--r-- | lib/libthr/thread/thr_private.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/libthr/thread/thr_private.h b/lib/libthr/thread/thr_private.h index 4459a2a..b36fef7 100644 --- a/lib/libthr/thread/thr_private.h +++ b/lib/libthr/thread/thr_private.h @@ -143,13 +143,8 @@ struct pthread_mutex_attr { { PTHREAD_MUTEX_DEFAULT, PTHREAD_PRIO_NONE, 0, MUTEX_FLAGS_PRIVATE } struct pthread_cond { - /* - * Lock for accesses to this structure. - */ struct umutex c_lock; - volatile umtx_t c_seqno; - volatile int c_waiters; - volatile int c_wakeups; + struct ucond c_kerncv; int c_pshared; int c_clockid; }; @@ -364,6 +359,9 @@ struct pthread { /* Thread is at cancellation point */ int cancel_point; + /* Cancellation should be synchoronized */ + int cancel_defer; + /* Asynchronouse cancellation is enabled */ int cancel_async; @@ -625,6 +623,8 @@ void _thread_printf(int, const char *, ...) __hidden; void _thr_spinlock_init(void) __hidden; void _thr_cancel_enter(struct pthread *) __hidden; void _thr_cancel_leave(struct pthread *) __hidden; +void _thr_cancel_enter_defer(struct pthread *) __hidden; +void _thr_cancel_leave_defer(struct pthread *, int) __hidden; void _thr_testcancel(struct pthread *) __hidden; void _thr_signal_block(struct pthread *) __hidden; void _thr_signal_unblock(struct pthread *) __hidden; |