From owner-svn-src-all@freebsd.org Fri Apr 22 17:02:38 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 36E3FB18616; Fri, 22 Apr 2016 17:02:38 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1203B1C02; Fri, 22 Apr 2016 17:02:38 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id CE18CB93A; Fri, 22 Apr 2016 13:02:36 -0400 (EDT) From: John Baldwin To: Hans Petter Selasky Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r298426 - head/sys/dev/fdc Date: Fri, 22 Apr 2016 09:43:47 -0700 Message-ID: <4396944.pMOIsoy4We@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.2-STABLE; KDE/4.14.3; amd64; ; ) In-Reply-To: <57191F7F.4010900@selasky.org> References: <201604211837.u3LIbalm092252@repo.freebsd.org> <57191F7F.4010900@selasky.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 22 Apr 2016 13:02:36 -0400 (EDT) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Apr 2016 17:02:38 -0000 On Thursday, April 21, 2016 08:44:15 PM Hans Petter Selasky wrote: > On 04/21/16 20:37, John Baldwin wrote: > > - tsleep(fdc, PRIBIO, "fdcrst", hz); > > + if (cold) > > + DELAY(1000000); > > + else > > + tsleep(fdc, PRIBIO, "fdcrst", hz); > > Hi, > > pause() and pause_sbt() does exactly this, checking for "cold" and using > DELAY(). Yes, I know. In theory though the driver interrupt could fire during normal operation aborting the sleep, so the wait channel for the !cold case is actually there for a reason it seems. (That is, in the !cold case the driver might terminate the sleep early which you can't do with pause.) -- John Baldwin