diff options
| author | Konstantin Belousov <kib@FreeBSD.org> | 2026-07-25 21:37:55 +0000 |
|---|---|---|
| committer | Konstantin Belousov <kib@FreeBSD.org> | 2026-07-27 16:17:28 +0000 |
| commit | 196cc005b197ab8bf5044c3fc457697986a14b39 (patch) | |
| tree | f42c85082e774b332b38cff62df3fe9e3dbcb664 | |
| parent | f4a05f37936e422b1e8f4f127253562d3f58f50c (diff) | |
libthr/thread/thr_umtx.c: style _thr_ucond_wait()
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D58463
| -rw-r--r-- | lib/libthr/thread/thr_umtx.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libthr/thread/thr_umtx.c b/lib/libthr/thread/thr_umtx.c index bbc68d0e30c6..db63017a6a13 100644 --- a/lib/libthr/thread/thr_umtx.c +++ b/lib/libthr/thread/thr_umtx.c @@ -242,18 +242,18 @@ _thr_ucond_init(struct ucond *cv) int _thr_ucond_wait(struct ucond *cv, struct umutex *m, - const struct timespec *timeout, int flags) + const struct timespec *timeout, int flags) { struct pthread *curthread; - if (timeout && (timeout->tv_sec < 0 || (timeout->tv_sec == 0 && + if (timeout != NULL && (timeout->tv_sec < 0 || (timeout->tv_sec == 0 && timeout->tv_nsec <= 0))) { curthread = _get_curthread(); _thr_umutex_unlock(m, TID(curthread)); return (ETIMEDOUT); } return (_umtx_op_err(cv, UMTX_OP_CV_WAIT, flags, m, - __DECONST(void*, timeout))); + __DECONST(void *, timeout))); } int |
