[Info-vax] yet another sys$qiow question

Chris Scheers chris at applied-synergy.com
Mon Aug 24 16:05:49 EDT 2015


Johnny Billquist wrote:
> On 2015-08-21 20:11, Chris Scheers wrote:
>> Johnny Billquist wrote:
>>>
>>> One example that I could think of, that might not be so poorly written
>>> code, which could bite you, would be something like:
>>>
>>> SYS$QIO(<arguments>);
>>> if (iosb == 0) {
>>>   <do some stuff>
>>>   <wait for I/O completion>
>>>   printf("IOSB is now %x\n", iosb);
>>> }
>>
>> Ignoring the volatile discussion for now (pun intended), I need to point
>> out that this code is flawed because it does not allow for the case
>> where the $QIO completes before execution of the "if".
> 
> But it does. If the $QIO completes before the if, the code will just 
> continue after the if. If that is right or wrong is outside the scope 
> here... :-)
> 
>     Johnny

True.  Perhaps I was reading too much into this, as I have been burned 
by QIOs that complete quicker than expected on hardware other than where 
the original testing was done.  <sigh>

-- 
-----------------------------------------------------------------------
Chris Scheers, Applied Synergy, Inc.

Voice: 817-237-3360            Internet: chris at applied-synergy.com
   Fax: 817-237-3074



More information about the Info-vax mailing list