Inline function
| Space | User/kernel |
| Context | Sync/async |
| May block | No |
| SPL | Any |
| Dynamic memory | No |
#include <SPAD/BARRIER.H>
static __finline__ void __barrier(void); 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.