_WriteBarrier
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.
Syntax
void _WriteBarrier(void);
Requirements
Intrinsic | Architecture |
---|---|
_WriteBarrier |
x86, x64 |
Header file <intrin.h>
Remarks
The _WriteBarrier
intrinsic limits the compiler optimizations that can remove or reorder memory access operations across the point of the call.
END Microsoft Specific
See also
Phản hồi
https://aka.ms/ContentUserFeedback.
Sắp ra mắt: Trong năm 2024, chúng tôi sẽ dần gỡ bỏ Sự cố với GitHub dưới dạng cơ chế phản hồi cho nội dung và thay thế bằng hệ thống phản hồi mới. Để biết thêm thông tin, hãy xem:Gửi và xem ý kiến phản hồi dành cho