>>19
They do. Library functions which perform synchronization also perform proper fencing themselves. If you're writing an OS, you would not be able to count with a standard library and would inevitably write nonportable code. If you don't have library functions to use, either don't do it or go unportable; volatile won't issue memory barriers for you anyway.