Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Apr 2002 12:57:40 +0100
From:      Brian Somers <brian@freebsd-services.com>
To:        Bruce Evans <bde@zeta.org.au>
Cc:        Brian Somers <brian@FreeBSD.org>, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/dev/digi digi.c 
Message-ID:  <200204101157.g3ABveOF052165@hak.lan.Awfulhak.org>
In-Reply-To: Message from Bruce Evans <bde@zeta.org.au>  of "Wed, 10 Apr 2002 20:45:13 %2B1000." <20020410204138.C7535-100000@gamplex.bde.org> 

next in thread | previous in thread | raw e-mail | index | archive | help
> 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 <brian@freebsd-services.com>                <brian@Awfulhak.org>
      http://www.freebsd-services.com/        <brian@[uk.]FreeBSD.org>
Don't _EVER_ lose your sense of humour !      <brian@[uk.]OpenBSD.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?200204101157.g3ABveOF052165>