Function core::arch::arm::__dmb

source ·
pub unsafe fn __dmb<A>(arg: A)
where A: Dmb,
🔬This is a nightly-only experimental API. (stdarch_arm_barrier #117219)
Available on ARM only.
Expand description

Generates a DMB (data memory barrier) instruction or equivalent CP15 instruction.

DMB ensures the observed ordering of memory accesses. Memory accesses of the specified type issued before the DMB are guaranteed to be observed (in the specified scope) before memory accesses issued after the DMB.

For example, DMB should be used between storing data, and updating a flag variable that makes that data available to another core.

The __dmb() intrinsic also acts as a compiler memory barrier of the appropriate type.