Compiler
Support of Memory-Ordering Directives
Windows provides the MemoryBarrier() macro,
which causes the compiler to emit memory-ordering instructions. OS X provides OSMemoryBarrier(), which provides the same functionality.
gcc and Solaris Studio support using inline assembly to generate
memory-ordering instructions. For example, asm volatile
("mfence":::"memory") would
insert an mfence instruction
at the desired location in the code.
Related Topics
Privacy Policy, Terms and Conditions, DMCA Policy and Compliant
Copyright © 2018-2023 BrainKart.com; All Rights Reserved. Developed by Therithal info, Chennai.