Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
_ReadWriteBarrier
Collapse the table of content
Expand the table of content

_ReadWriteBarrier

Microsoft Specific

Limits the compiler optimizations that can reorder memory accesses across the point of the call.

Caution note Caution

The _ReadBarrier, _WriteBarrier, and _ReadWriteBarrier compiler intrinsics and the MemoryBarrier macro are all deprecated and should not be used. For inter-thread communication, use mechanisms such as atomic_thread_fence and std::atomic<T>, which are defined in the C++ Standard Library Reference. For hardware access, use the /volatile:iso compiler option together with the volatile (C++) keyword.

void _ReadWriteBarrier(void);

Intrinsic

Architecture

_ReadWriteBarrier

x86, x64

Header file <intrin.h>

The _ReadWriteBarrier intrinsic limits the compiler optimizations that can remove or reorder memory accesses across the point of the call.

Show:
© 2015 Microsoft