mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-16 10:20:30 +00:00
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
This commit is contained in:
parent
b62e898e00
commit
7859df8e67
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=227604
@ -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));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user