KeMemoryBarrierWithoutFence routine

The KeMemoryBarrierWithoutFence routine creates a barrier at its position in the code—across which the compiler cannot move any operations.

Syntax

VOID KeMemoryBarrierWithoutFence(void);

Parameters

This routine has no parameters.

Return value

None

Remarks

The compiler can optimize your code by reordering the execution of operations. You can inhibit this behavior by calling KeMemoryBarrierWithoutFence—which prevents the compiler from moving any operation that appears before the call to a position after that call, and vice versa.

However, note that the processor can reorder operations as it executes them. To prevent the both the processor and the compiler from reordering operations, call the KeMemoryBarrier routine.

Requirements

Target platform

Desktop

Header

Wdm.h (include Wdm.h, Ntddk.h, or Ntifs.h)

IRQL

Any level

See also

KeMemoryBarrier

 

 

Send comments about this topic to Microsoft