[Info-vax] yet another sys$qiow question
Bob Gezelter
gezelter at rlgsc.com
Fri Aug 14 08:51:41 EDT 2015
On Thursday, August 13, 2015 at 10:34:22 PM UTC-4, David Froble wrote:
> JF Mezei wrote:
> > On 15-08-12 22:28, David Froble wrote:
> >
> >> I find timer ASTs to be rather trivial ...
> >
> >
> > But when a timer AST is triggered, you still need code to check if the
> > actioal IO completed, if not, then $CANCEL it with some flag indicating
> > it timed out (so the code that executes when the IO completion AST is
> > triggered knows the IO was timed out but still process whatever was in
> > the buffer.
>
> A timer AST is just to stop the waiting. You can still choose to attempt to
> process any available data.
>
> That said, the manner in which I usually use a timer AST with a sync read is to
> decide that the task didn't complete in time, and therefore is considered to be
> discarded.
>
> But, as usual, it depends on what you're trying to do ....
David, JF,
When using a Timer AST to trigger a Cancel IO, one needs to be aware of the potential race condition. To be specific, it is possible for the IO to complete normally AFTER the Timer has expired BUT before the Cancel actually takes place.
The definitive information is to be found in the IOSB upon IO completion. If an IO is canceled, the IOSB will reflect this. If it was canceled, the IOSB will so indicate.
The precise details of $CANCEL are well-documented in the IDSM.
- Bob Geelter, http://www.rlgsc.com
More information about the Info-vax
mailing list