Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Apr 2002 09:06:18 -0400 (EDT)
From:      John Baldwin <jhb@FreeBSD.org>
To:        Bruce Evans <bde@zeta.org.au>
Cc:        cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org, Brian Somers <brian@FreeBSD.org>
Subject:   Re: cvs commit: src/sys/dev/digi digi.c
Message-ID:  <XFMail.20020410090618.jhb@FreeBSD.org>
In-Reply-To: <20020410204138.C7535-100000@gamplex.bde.org>

next in thread | previous in thread | raw e-mail | index | archive | help

On 10-Apr-2002 Bruce Evans wrote:
> 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 ...
> 
>>
>>   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.

I've thought about having some sort of separate API for code that just ways to
delay.  Right now they use tsleep() on a channel that never gets woken up with
a timeout.  If we had a delay(int timo) function then it could use a callout
when callouts were working and fall back to DELAY() in the cold case.

> Bruce

-- 

John Baldwin <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




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