From owner-cvs-all Wed Apr 10 4:57:53 2002 Delivered-To: cvs-all@freebsd.org Received: from Awfulhak.org (gw.Awfulhak.org [217.204.245.18]) by hub.freebsd.org (Postfix) with ESMTP id 506CB37B404; Wed, 10 Apr 2002 04:57:47 -0700 (PDT) Received: from hak.lan.Awfulhak.org (root@hak.lan.Awfulhak.org [IPv6:fec0::1:12]) by Awfulhak.org (8.12.2/8.11.6) with ESMTP id g3ABvhoi029286; Wed, 10 Apr 2002 12:57:44 +0100 (BST) (envelope-from brian@freebsd-services.com) Received: from hak.lan.Awfulhak.org (brian@localhost [127.0.0.1]) by hak.lan.Awfulhak.org (8.12.2/8.12.2) with ESMTP id g3ABveOF052165; Wed, 10 Apr 2002 12:57:40 +0100 (BST) (envelope-from brian@freebsd-services.com) Message-Id: <200204101157.g3ABveOF052165@hak.lan.Awfulhak.org> X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4 To: Bruce Evans Cc: Brian Somers , cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/dev/digi digi.c In-Reply-To: Message from Bruce Evans of "Wed, 10 Apr 2002 20:45:13 +1000." <20020410204138.C7535-100000@gamplex.bde.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 10 Apr 2002 12:57:40 +0100 From: Brian Somers Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > On Tue, 9 Apr 2002, Brian Somers wrote: > > > brian 2002/04/09 20:13:28 PDT > > > > Modified files: > > sys/dev/digi digi.c > > Log: > > Add a digi_delay() function and use it instead of tsleep() when polling > > the card for command completion. > > > > digi_delay() uses either tsleep() or DELAY() depending on the value of > > ``cold''. > > > > Pointed in the right direction by: jhb > > Maybe tsleep() should sleep when cold if given a timeout. This is not quite > right, since the semantics of the timeout arg is to give a maximum wait, > not a delay, but it is better than ... Well, I guess I'm abusing tsleep() - using it as a DELAY() that doesn't spin.... but I don't know of anything more suitable. > > > > Revision Changes Path > > 1.25 +14 -5 src/sys/dev/digi/digi.c > > N * (+14 -5) in N drivers. All drivers that support dynamic loading need > something like this, since busy-waiting on running systems is unacceptable. > Not that I will ever want to use this misfeature. Perhaps we just need to rename digi_delay() to delay() and put it somewhere more interesting ? > Bruce -- Brian http://www.freebsd-services.com/ Don't _EVER_ lose your sense of humour ! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message