Partager via


_ReadWriteBarrier, _WriteBarrier, _ReadBarrier (Windows Embedded CE 6.0)

1/5/2010

_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.

_ReadBarrier forces all previous memory read operations to complete before any subsequent read operation is started.

Syntax

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

Parameters

None.

Return Value

None.

Remarks

_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.

_ReadBarrier forces reads from memory to complete at the point of the call. After the call, other threads can access the memory without fear that the thread that made the call might have a pending read from the memory.

Requirements

Architecture ARM, MIPS, SH-4, x86
Header cmnintrin.h
Routine _WriteBarrier

See Also

Reference

Common Intrinsic Functions for Device Compilers

Other Resources

Intrinsic Functions for Device Compilers