Subject: Re: Is one allowed to call tsleep from within an interrupt context?
To: Brett Lymn <>
From: Lennart Augustsson <>
List: tech-kern
Date: 09/13/1999 09:29:39
Brett Lymn wrote:

> I suppose what I need to do is modify the function so if it is called
> from within an interrupt it avoids tsleep.  I think the function is
> shared between interrupt & proc contexts so tsleep may be appropriate
> some of the time :-/

I had that problem too, and I used a hack.  If curproc is 0 I use a timeout()
and do the rest of the processing in the timeout function, otherwise I
use tsleep().  The timeout() version would work all the time, of course,
but in this particular instance I had reasons not to do it that way.


        -- Lennart