From owner-svn-src-head@FreeBSD.ORG Mon Jun 11 20:07:03 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 43D70106566C; Mon, 11 Jun 2012 20:07:03 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.dawidek.net (60.wheelsystems.com [83.12.187.60]) by mx1.freebsd.org (Postfix) with ESMTP id E4F468FC0C; Mon, 11 Jun 2012 20:07:02 +0000 (UTC) Received: from localhost (89-73-195-149.dynamic.chello.pl [89.73.195.149]) by mail.dawidek.net (Postfix) with ESMTPSA id DC256E6B; Mon, 11 Jun 2012 22:07:01 +0200 (CEST) Date: Mon, 11 Jun 2012 22:05:07 +0200 From: Pawel Jakub Dawidek To: Hans Petter Selasky Message-ID: <20120611200507.GG1399@garage.freebsd.pl> References: <201206111921.q5BJL0jP005127@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="WkfBGePaEyrk4zXB" Content-Disposition: inline In-Reply-To: <201206111921.q5BJL0jP005127@svn.freebsd.org> X-OS: FreeBSD 10.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r236909 - head/sbin/hastd X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jun 2012 20:07:03 -0000 --WkfBGePaEyrk4zXB Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jun 11, 2012 at 07:21:00PM +0000, Hans Petter Selasky wrote: > Author: hselasky > Date: Mon Jun 11 19:20:59 2012 > New Revision: 236909 > URL: http://svn.freebsd.org/changeset/base/236909 >=20 > Log: > Use the correct clock source when computing timeouts. Could you please explain why? As you can see some lines above in cv_init(), we initialize condition variable with CLOCK_MONOTONIC too: error =3D pthread_condattr_setclock(&attr, CLOCK_MONOTONIC); > MFC after: 1 week >=20 > Modified: > head/sbin/hastd/synch.h >=20 > Modified: head/sbin/hastd/synch.h > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sbin/hastd/synch.h Mon Jun 11 19:09:55 2012 (r236908) > +++ head/sbin/hastd/synch.h Mon Jun 11 19:20:59 2012 (r236909) > @@ -168,7 +168,7 @@ cv_timedwait(pthread_cond_t *cv, pthread > return (false); > } > =20 > - error =3D clock_gettime(CLOCK_MONOTONIC, &ts); > + error =3D clock_gettime(CLOCK_REALTIME, &ts); > PJDLOG_ASSERT(error =3D=3D 0); > ts.tv_sec +=3D timeout; > error =3D pthread_cond_timedwait(cv, lock, &ts); --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://tupytaj.pl --WkfBGePaEyrk4zXB Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEUEARECAAYFAk/WT3MACgkQForvXbEpPzQiHwCVHtg/PAnt03afKbDGvSt2NpPk xwCg0TWw3YuC6HXqA2dkiz6qDIsCe6A= =S3JO -----END PGP SIGNATURE----- --WkfBGePaEyrk4zXB--