[Info-vax] Volatile, was: Re: yet another sys$qiow question
John Reagan
xyzzy1959 at gmail.com
Wed Aug 26 12:29:50 EDT 2015
Looking at the code, the updating of the IOSB is done very carefully. There are EVAX_MB builtins used in the code (it is in Macro32) and they make very sure that the first longword is always filled in last (with an MB between storing into the 2nd longword and storing into the 1st longword). I also found code that worries about misaligned IOSBs to ensure atomic updating (including letting an alignment fault occur just to get proper synchronization).
Looking in just the [SYS] facility (so that doesn't even count drivers, RMS, RTLs, etc.), I found 389 uses of the MB instruction. That EVAX_MB builtin is mapped to the 'mf' instruction for Itanium. There are equivalent instructions for x86 although the stronger memory ordering rules might make some of them unnecessary (but I doubt that the Macro compiler will be able to figure that out without human assistance)
More information about the Info-vax
mailing list