Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Feb 2012 08:30:19 +0000 (UTC)
From:      David Xu <davidxu@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r231996 - stable/9/lib/libthr/thread
Message-ID:  <201202220830.q1M8UJuO041915@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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 {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201202220830.q1M8UJuO041915>