[Info-vax] Volatile, was: Re: yet another sys$qiow question

JF Mezei jfmezei.spamnot at vaxination.ca
Thu Aug 27 11:39:06 EDT 2015


On 15-08-27 05:45, Johnny Billquist wrote:

> Polled I/O is not a sane way to go.

Yes it is, if you're on DOS on an 8086 that has no power management
features and consumes as much power whether you are in an infinite loop
checking the IOSB or infinite loop waiting for something else :-)


> WIth ASTs or event flags, you 
> normally do not "monitor" them. You just wait until they happen.

However, here is one legit possibility:

A timer expires, so you then check the IOSB for the IO to ensure it
truly hasn't completed yet and if still null, you do the $CANCEL thing.


(purists will say that you should check event flag for the IO instead of
IOSB, but it appears that many accept checking for non-zero IOSB to do
the job).

Note that this would be a one time check, so not likely to trigger the
"volatile" check, but could have some race condition if IO completes
between the timer AST being started and you checking the IOSB inside
that AST.



More information about the Info-vax mailing list