[Info-vax] QIO Writes to a mailbox

Richard B. Gilbert rgilbert88 at comcast.net
Fri Nov 4 15:58:43 EDT 2011


On 11/4/2011 6:04 AM, Steve Bainbridge wrote:
> Hi,
>
> I have a very simple question, but when looking at the Alpha internals
> manual and talking to colleagues the answer does not seem so obvious.
>
> We have some old code that issues a QIO WRITEVBLK to a mailbox - the
> return code from the QIO is normal. Another process reads the mailbox
> and never gets the message - this only happens very rarely.
> Unfortunately the writer does not check or report what value the IOSB
> returns and I need to try and understand why these messages are
> getting lost. I can't reproduce this on our test systems and I can't
> easily install updated diagnostic code onto these production systems.
>
> The question I have is when is the data pointed to by P1 (in the QIO
> call) actually copied ? It is always done within the QIO routine or is
> it just scheduled to be done in the QIO call ? Can I re-use the buffer
> pointed to by P1 immediately after the call to the QIO ?
>

Steve,

The "Q" in QIO stands for queue.  If you are writing to a device the 
write may be be done immediately or, if there is a queue for the channel 
or the device, your write may have to wait its turn!

You have the option of waiting for your I/O operation to complete, 
$QIOW, or you can go on about your business and check the status of the 
of the write at some later time, $QIO without the "W".

DO NOT re-use the buffer until the $QIO operation is complete!

ISTR that the VMS documentation explains this in some detail.

One thing that you can and probably should do is to check the $QIO 
completion code.

There are two codes to check.  The first tells you that you coded the 
the $QIO call correctly,  my memory is a little fuzzy on this but ISTR 
that the four low order bits should be 0001, an indication of  success. 
  If it's anything else, the low order bits show the "severity" and the 
remaining 28 bits are a code specific to the error.

The $QIO call contains a pointer to the I/O Status Block (IOSB) which
will be posted with I/O completion status.

For the "authoritative" information see the VMS documentation.  I know! 
  The documentation set weighs more than I do (well, ALMOST) and
takes five or six feet of shelf space!  Those who have bothered to read 
it can tell you that it's well worth the expense and effort involved.
(If, of course, you plan to use VMS for something.)





More information about the Info-vax mailing list