Author: davidxu
Date: Wed Feb 22 08:30:18 2012
New Revision: 231996
URL: http://svn.freebsd.org/changeset/base/231996

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

Modified:
  stable/9/lib/libthr/thread/thr_umtx.c
Directory Properties:
  stable/9/lib/libthr/   (props changed)

Modified: stable/9/lib/libthr/thread/thr_umtx.c
==============================================================================
--- stable/9/lib/libthr/thread/thr_umtx.c       Wed Feb 22 07:34:23 2012        
(r231995)
+++ stable/9/lib/libthr/thread/thr_umtx.c       Wed Feb 22 08:30:18 2012        
(r231996)
@@ -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-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to