[Info-vax] yet another sys$qiow question
Johnny Billquist
bqt at softjar.se
Fri Aug 21 14:24:52 EDT 2015
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
More information about the Info-vax
mailing list