Interface __barrier

Inline function

SpaceUser/kernel
ContextSync/async
May blockNo
SPLAny
Dynamic memoryNo

#include <SPAD/BARRIER.H>

static __finline__ void __barrier(void);

Description

This function prevents reordering of instructions by the compiler. So that any AST or interrupt that interrupts the current code sequence will see ordered state — when it sees any of the assignments following __barrier(), it can expects that all the assignments preceding __barrier() have completed.

__barrier() doesn't protect against reordering of instructions within the CPU itself.

See also

__barrier_ptr