I'm a newbie when it comes to this. Could anyone provide a simplified explanation of the differences between the following memory barriers?
- The windows
MemoryBarrier();
- The fence
_mm_mfence();
- The inline assembly
asm volatile ("" : : : "memory");
- The intrinsic
_ReadWriteBarrier();
If there isn't a simple explanation some links to good articles or books would probably help me get it straight. Until now I was fine with just using objects written by others wrapping these calls but I'd like to have a better understanding than my current thinking which is basically along the lines of there is more than one way to implement memory barriers under the covers.
See Question&Answers more detail:os