Author: davidxu
Date: Sun Feb 19 08:17:14 2012
New Revision: 231906
URL: http://svn.freebsd.org/changeset/base/231906

Log:
  Check both seconds and nanoseconds are zero, only checking nanoseconds
  is zero may trigger timeout too early. It seems a copy&paste bug.

Modified:
  head/lib/libthr/thread/thr_umtx.c

Modified: head/lib/libthr/thread/thr_umtx.c
==============================================================================
--- head/lib/libthr/thread/thr_umtx.c   Sun Feb 19 07:44:38 2012        
(r231905)
+++ head/lib/libthr/thread/thr_umtx.c   Sun Feb 19 08:17:14 2012        
(r231906)
@@ -205,7 +205,7 @@ _thr_umtx_timedwait_uint(volatile u_int 
        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 {
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to