[Info-vax] QIO Writes to a mailbox
Jan-Erik Soderholm
jan-erik.soderholm at telia.com
Tue Nov 8 16:28:49 EST 2011
JF Mezei wrote 2011-11-08 20:12:
> VAXman- @SendSpamHere.ORG wrote:
>
>> Specify the IOSB, check it and assume nothing! Then, the code should
>> work.
>
> No. Looking at the IOSB won't make the code work and the problem
> disappear. You will just notice a bad retrun code should there be one.
>
> However, the writing process may be working fine and it may be the
> reading process which dicards a message by mistake.
>
> While it is not kosher for the writng process do to a $QIO without
> waiting for completion and checking the IOSB to at least report a
> problem in a log, this may not be the cause of the problem. It just
> allows the problem to go undetected by the writing process IF the
> problem is with the writing process.
>
> Note that if the writing process excepts an answer from the other
> process, there may be a wait statement there (waiting for the answer)
> which does imply that the writing process will wait for the $QIO to
> complete before issuing the next one.
Now, if you want to do a $QIO and then always *wait* for completion,
why not use $QIOW in the first place ?
One efficient way to do it is to check the previous IO (say, by
checking the IOSB) right *before* you will do the *next* $QIO.
In that way, you can do any other processing you like in your
app while the I/O subsystem completes the IO asyncronicaly.
Always waiting right *after* the $QIO is inefficent and you could
anyway use $QIOW and let the system take care of the "waiting".
Jan-Erik.
More information about the Info-vax
mailing list