Skip to content

Latest commit

 

History

History
43 lines (30 loc) · 1.61 KB

readwritebarrier.md

File metadata and controls

43 lines (30 loc) · 1.61 KB
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: _ReadWriteBarrier
_ReadWriteBarrier
09/02/2019
_ReadWriteBarrier
ReadWriteBarrier intrinsic
_ReadWriteBarrier intrinsic
dd9f58b5-8bb6-494e-bb0f-9fe184f3908d

_ReadWriteBarrier

Microsoft Specific

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

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. For hardware access, use the /volatile:iso compiler option together with the volatile keyword.

Syntax

void _ReadWriteBarrier(void);

Requirements

Intrinsic Architecture
_ReadWriteBarrier x86, x64

Header file <intrin.h>

Remarks

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

END Microsoft Specific

See also

_ReadBarrier
_WriteBarrier
Compiler intrinsics
Keywords