[Info-vax] yet another sys$qiow question
JF Mezei
jfmezei.spamnot at vaxination.ca
Wed Aug 19 14:34:55 EDT 2015
>> 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).
Another way is to use malloc, at which point the structures remain
allocated irrespective of which subroutine is running at the moment.
Did something change since the 1990s that makes C code no longer work
properly because even those allocations are now volatile and risk being
eliminated at run time, resulting in the IO completion writing data into
the original memory locations which now belong to other variables (or
worse, someone else) ?
More information about the Info-vax
mailing list