summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/libthr/thread/thr_umtx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libthr/thread/thr_umtx.c b/lib/libthr/thread/thr_umtx.c
index e962378..0a8f861 100644
--- a/lib/libthr/thread/thr_umtx.c
+++ b/lib/libthr/thread/thr_umtx.c
@@ -205,7 +205,7 @@ _thr_umtx_timedwait_uint(volatile u_int *mtx, u_int id, int clockid,
if (abstime != NULL) {
clock_gettime(clockid, &ts);
TIMESPEC_SUB(&ts2, abstime, &ts);
- if (ts2.tv_sec < 0 || ts2.tv_nsec <= 0)
+ if (ts2.tv_sec < 0 || (ts2.tv_sec == 0 && ts2.tv_nsec <= 0))
return (ETIMEDOUT);
tsp = &ts2;
} else {
OpenPOWER on IntegriCloud