[Coco] F$Sleep, drivers, and interrupt masks

L. Curtis Boyle curtisboyle at sasktel.net
Thu Sep 18 14:17:46 EDT 2008


On Thu, 18 Sep 2008 11:47:10 -0600, Chuck Youse  
<cyouse at serialtechnologies.com> wrote:
> Hey folks,
>
> Before I start digging through the bowels of Nitr/OS-9, I have a
> question someone might have a ready answer for: is it valid for a device
> driver to call F$Sleep with interrupts disabled?
>
> Of course the assumption being that the system will re-enable them, and
> possibly disable them before scheduling the sleeping driver process
> again.
>
> The reason I ask is I'm trying to avoid a race condition; resetting a
> chip results in an interrupt, but I don't want to risk the interrupt
> arriving before I go to sleep - resulting in a process that never wakes
> up.  Pretty classic race condition.
>

I can't remember, but I think the Suspend bit (in Level 2, anyways) is  
what one should use instead of F$Sleep. Hopefully somebody else remembers  
better than I do.


-- 
L. Curtis Boyle



More information about the Coco mailing list