Skip to content

Latest commit

 

History

History
67 lines (56 loc) · 1.95 KB

readbarrier.md

File metadata and controls

67 lines (56 loc) · 1.95 KB
title _ReadBarrier | Microsoft Docs
ms.custom
ms.date 11/04/2016
ms.reviewer
ms.suite
ms.technology
cpp-tools
ms.tgt_pltfrm
ms.topic article
f1_keywords
_ReadBarrier
dev_langs
C++
helpviewer_keywords
_ReadBarrier intrinsic
ms.assetid f9e54a92-61bc-4f55-8195-b8932065a796
caps.latest.revision 25
author corob-msft
ms.author corob
manager ghogen
translation.priority.ht
cs-cz
de-de
es-es
fr-fr
it-it
ja-jp
ko-kr
pl-pl
pt-br
ru-ru
tr-tr
zh-cn
zh-tw

_ReadBarrier

Microsoft Specific

Limits the compiler optimizations that can reorder memory access operations 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> that are defined in the C++ Standard Library. For hardware access, use the /volatile:iso compiler option together with the volatile keyword.

Syntax

void _ReadBarrier(void);  

Requirements

Intrinsic Architecture
_ReadBarrier x86, [!INCLUDEvcprx64]

Header file <intrin.h>

Remarks

The _ReadBarrier intrinsic limits the compiler optimizations that can remove or reorder memory access operations across the point of the call.

END Microsoft Specific

See Also

Compiler Intrinsics
Keywords