[Info-vax] QIO Writes to a mailbox

Johnny Billquist bqt at softjar.se
Fri Nov 4 19:04:03 EDT 2011


On 2011-11-04 23.47, Kenneth Fairfield wrote:
> On Friday, November 4, 2011 2:56:03 PM UTC-7, Steve Bainbridge wrote:
> [...]
>
>> As I said at the beginning of this thread the IOSB is never checked,
>> so we don't know if and why the QIO completed OK - I am only trying to
>> find reasons why it would not - given the limited information
>> available to me (the IOSB is declared as a static variable at the
>> beginning of the procedure)
>
>
> I hate to jump in when so many other more knowledgeable
> posters have replied with what amounts to the definitive
> answer...  Nevertheless, and given the above paragraph,
> and given that the code you posted calls QIO but doesn't
> wait on completion, you're practically guaranteed to
> have errors.
>
> It's just UNlucky that you didn't encounter them long
> ago.  Not waiting on completion is exasperated by
> running on faster hardware, and, if I'm not mistaken,
> by running on SMP hardware.
>
> It sure looks to me like the caller is specifying
> C_OSI_NOWAIT but doesn't supply the required call-
> back routines.  And in any case, the NOWAIT / QIO
> branch in the called routine doesn't wait on the
> event flag.
>
> Change the caller to omit the C_OSI_NOWAIT and the
> obvious logic error will be eliminated.  There may
> be other bugs lurking as well, but calling QIO
> without waiting on completion is flat out a design
> error in the code.

Well, yes and no. You do not have to explicitly wait for I/O to 
complete. It can, after all, tell you when it's done, through the AST.

But the same basic principle applies. In some way, you should do the 
post processing once the I/O is done, as only then can you know the 
result of the I/O.

	Johnny



More information about the Info-vax mailing list