Export (0) Print
Expand All

_ReadWriteBarrier, _WriteBarrier 

Visual Studio 2005

_ReadWriteBarrier forces all previous memory accesses to complete before subsequent memory access is started.

_WriteBarrier forces all previous memory write operations to complete before any subsequent write operation is started.


void __cdecl _ReadWriteBarrier(void);
void __cdecl _WriteBarrier(void);

Parameters

None.

_WriteBarrier is usually used for writing device drivers to make sure that a set of commands has been sent to the device before further commands are issued. The compiler does not reschedule memory writes across an invocation of _WriteBarrier, even on hardware platforms without explicit synchronization instructions.

_ReadWriteBarrier is usually used for writing device drivers to make sure that commands have been sent to the device before status is read.

The compiler does not reschedule memory reads and writes across an invocation of _ReadWriteBarrier, even on hardware platforms without explicit synchronization instructions.

Routine Required header Architecture

_WriteBarrier

<cmnintrin.h>

x86, ARM, SH-4, MIPS

_ReadWriteBarrier

<cmnintrin.h>

x86, ARM, SH-4, MIPS

Community Additions

ADD
Show:
© 2014 Microsoft