[Info-vax] yet another sys$qiow question

John Reagan xyzzy1959 at gmail.com
Wed Aug 19 15:14:06 EDT 2015


On Wednesday, August 19, 2015 at 2:34:58 PM UTC-4, JF Mezei wrote:
> >> You don't need memory barriers.  You do need volatile.  The IOSB is written behind your back.  volatile says we have to re-fetch. \
> 
> 
> Pardon my ignorance here, but I thought that structures such as IOSB,
> and buffers to receive data from IO simply needed to be declared outside
> a subroutine to be "permanent" and not risk being deallocated/re-used as
> soon as subroutine ended (in C).
> 

Yes, you have to be concerned about the lifetime of the IOSB.  Most folks will recognize the error if you declare a local IOSB, pass that to $QIO, and then return from the routine.  When the IOSB is finally written, there isn't any telling who's memory is being written.



More information about the Info-vax mailing list