summaryrefslogtreecommitdiffstats
path: root/lib/libthr
diff options
context:
space:
mode:
authordavidxu <davidxu@FreeBSD.org>2011-11-17 01:43:50 +0000
committerdavidxu <davidxu@FreeBSD.org>2011-11-17 01:43:50 +0000
commitd0004038aeb73555b710af5a77e4b38d74a757e8 (patch)
tree4eaade3912462b22503701664da63289fe05c4ec /lib/libthr
parent446da3721f45347b47bb08332a2da8bc00b2a590 (diff)
downloadFreeBSD-src-d0004038aeb73555b710af5a77e4b38d74a757e8.zip
FreeBSD-src-d0004038aeb73555b710af5a77e4b38d74a757e8.tar.gz
Pass CVWAIT flags to kernel, this should handle
timeout correctly for pthread_cond_timedwait when it uses kernel-based condition variable. PR: 162403 Submitted by: jilles MFC after: 3 days
Diffstat (limited to 'lib/libthr')
-rw-r--r--lib/libthr/thread/thr_umtx.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/libthr/thread/thr_umtx.c b/lib/libthr/thread/thr_umtx.c
index 33c3637..e962378 100644
--- a/lib/libthr/thread/thr_umtx.c
+++ b/lib/libthr/thread/thr_umtx.c
@@ -231,7 +231,7 @@ _thr_ucond_init(struct ucond *cv)
int
_thr_ucond_wait(struct ucond *cv, struct umutex *m,
- const struct timespec *timeout, int check_unparking)
+ const struct timespec *timeout, int flags)
{
if (timeout && (timeout->tv_sec < 0 || (timeout->tv_sec == 0 &&
timeout->tv_nsec <= 0))) {
@@ -239,8 +239,7 @@ _thr_ucond_wait(struct ucond *cv, struct umutex *m,
_thr_umutex_unlock(m, TID(curthread));
return (ETIMEDOUT);
}
- return _umtx_op_err(cv, UMTX_OP_CV_WAIT,
- check_unparking ? UMTX_CHECK_UNPARKING : 0,
+ return _umtx_op_err(cv, UMTX_OP_CV_WAIT, flags,
m, __DECONST(void*, timeout));
}
OpenPOWER on IntegriCloud