| title | _WriteBarrier | Microsoft Docs | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ms.custom | ||||||||||||||
| ms.date | 11/04/2016 | |||||||||||||
| ms.reviewer | ||||||||||||||
| ms.suite | ||||||||||||||
| ms.technology |
|
|||||||||||||
| ms.tgt_pltfrm | ||||||||||||||
| ms.topic | article | |||||||||||||
| f1_keywords |
|
|||||||||||||
| dev_langs |
|
|||||||||||||
| helpviewer_keywords |
|
|||||||||||||
| ms.assetid | a5ffdad9-0ca1-4eb7-b2f3-0f092c4bf4b5 | |||||||||||||
| caps.latest.revision | 23 | |||||||||||||
| author | corob-msft | |||||||||||||
| ms.author | corob | |||||||||||||
| manager | ghogen | |||||||||||||
| translation.priority.ht |
|
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>, which are defined in the C++ Standard Library. For hardware access, use the /volatile:iso compiler option together with the volatile keyword.
void _WriteBarrier(void);
| Intrinsic | Architecture |
|---|---|
_WriteBarrier |
x86, [!INCLUDEvcprx64] |
Header file <intrin.h>
The _WriteBarrier intrinsic limits the compiler optimizations that can remove or reorder memory access operations across the point of the call.
END Microsoft Specific