Negative absolute timeouts are valid inputs.
With input from kettenis@.
Thread: https://marc.info/?l=openbsd-tech&m=
170467558006767&w=2
ok guenther@
-/* $OpenBSD: rthread_cond.c,v 1.5 2019/01/29 17:40:26 mpi Exp $ */
+/* $OpenBSD: rthread_cond.c,v 1.6 2024/01/10 04:28:43 cheloha Exp $ */
/*
* Copyright (c) 2017 Martin Pieuchot <mpi@openbsd.org>
* Copyright (c) 2012 Philip Guenther <guenther@openbsd.org>
}
cond = *condp;
- if (abs == NULL || abs->tv_sec < 0 || abs->tv_nsec < 0 ||
- abs->tv_nsec >= 1000000000)
+ if (abs == NULL || abs->tv_nsec < 0 || abs->tv_nsec >= 1000000000)
return (EINVAL);
return (_rthread_cond_timedwait(cond, mutexp, abs));
-/* $OpenBSD: rthread_sync.c,v 1.5 2018/04/24 16:28:42 pirofti Exp $ */
+/* $OpenBSD: rthread_sync.c,v 1.6 2024/01/10 04:28:43 cheloha Exp $ */
/*
* Copyright (c) 2004,2005 Ted Unangst <tedu@openbsd.org>
* Copyright (c) 2012 Philip Guenther <guenther@openbsd.org>
abort();
}
- if (abstime == NULL || abstime->tv_sec < 0 || abstime->tv_nsec < 0 ||
+ if (abstime == NULL || abstime->tv_nsec < 0 ||
abstime->tv_nsec >= 1000000000)
return (EINVAL);