summaryrefslogtreecommitdiffstats
path: root/sys/sys/_umtx.h
diff options
context:
space:
mode:
authordavidxu <davidxu@FreeBSD.org>2010-12-22 05:01:52 +0000
committerdavidxu <davidxu@FreeBSD.org>2010-12-22 05:01:52 +0000
commit437ad27f9c81f522301de0affe1fc5fef37d8828 (patch)
treed717e6b5f295c555e1deef8497d4130bec1843cf /sys/sys/_umtx.h
parent24b08bca030970592bc5241517b0462f603b05b1 (diff)
downloadFreeBSD-src-437ad27f9c81f522301de0affe1fc5fef37d8828.zip
FreeBSD-src-437ad27f9c81f522301de0affe1fc5fef37d8828.tar.gz
MFp4:
- Add flags CVWAIT_ABSTIME and CVWAIT_CLOCKID for umtx kernel based condition variable, this should eliminate an extra system call to get current time. - Add sub-function UMTX_OP_NWAKE_PRIVATE to wake up N channels in single system call. Create userland sleep queue for condition variable, in most cases, thread will wait in the queue, the pthread_cond_signal will defer thread wakeup until the mutex is unlocked, it tries to avoid an extra system call and a extra context switch in time window of pthread_cond_signal and pthread_mutex_unlock. The changes are part of process-shared mutex project.
Diffstat (limited to 'sys/sys/_umtx.h')
-rw-r--r--sys/sys/_umtx.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/sys/_umtx.h b/sys/sys/_umtx.h
index fcda974..fa0ed99 100644
--- a/sys/sys/_umtx.h
+++ b/sys/sys/_umtx.h
@@ -46,7 +46,8 @@ struct umutex {
struct ucond {
volatile __uint32_t c_has_waiters; /* Has waiters in kernel */
__uint32_t c_flags; /* Flags of the condition variable */
- __uint32_t c_spare[2]; /* Spare space */
+ __uint32_t c_clockid; /* Clock id */
+ __uint32_t c_spare[1]; /* Spare space */
};
struct urwlock {
OpenPOWER on IntegriCloud