Subject: Re: Is one allowed to call tsleep from within an interrupt context?
To: None <tls@rek.tjls.com>
From: Brett Lymn <blymn@baea.com.au>
List: tech-kern
Date: 09/13/1999 14:01:39
According to Thor Lancelot Simon:
>
>Absolutely not.  It's been suggested in the past that tsleep should
>probably instantly panic if called from an interrupt context, since
>backtraces can be difficult to get otherwise (IIRC you may not panic
>until you hit code elsewhere in the kernel that tries to reference
>curproc).
>

Fortunately for me I have KTRACE defined which means that curproc is
referenced in tsleep - this is the point at which tsleep was causing
the panic.  

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 :-/

-- 
===============================================================================
Brett Lymn, Computer Systems Administrator, British Aerospace Australia
===============================================================================