Subject: Re: Is one allowed to call tsleep from within an interrupt context?
To: None <email@example.com>
From: Wolfgang Solfrank <firstname.lastname@example.org>
Date: 09/13/1999 13:56:57
> 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.
So are you saying that your code might call tsleep in an interrupt handler?
As others have already said, this would be a gross error! It's not enough
to test curproc against 0 to test for an interrupt context. That pointer
is only 0 when the machine is in the idle loop, but you can of course get
interrupts at other times, too.
I have to admit however, that I haven't looked at any of your code yet.
ws@TooLs.DE (Wolfgang Solfrank, TooLs GmbH) +49-228-985800