Home | | Multi - Core Architectures and Programming | Compiler Support of Memory-Ordering Directives

Chapter: Multicore Application Programming For Windows, Linux, and Oracle Solaris : Hand-Coded Synchronization and Sharing

Compiler Support of Memory-Ordering Directives

Windows provides the MemoryBarrier() macro, which causes the compiler to emit memory-ordering instructions.

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.


Study Material, Lecturing Notes, Assignment, Reference, Wiki description explanation, brief detail
Multicore Application Programming For Windows, Linux, and Oracle Solaris : Hand-Coded Synchronization and Sharing : Compiler Support of Memory-Ordering Directives |


Privacy Policy, Terms and Conditions, DMCA Policy and Compliant

Copyright © 2018-2024 BrainKart.com; All Rights Reserved. Developed by Therithal info, Chennai.