Skip to content
Commit 258877a9 authored by Peter Bigot's avatar Peter Bigot Committed by Anas Nashif
Browse files

irq: document requirement that irq_lock/unlock provides a memory barrier



Correct functioning of spinlocks requires that they be memory barriers.
With CONFIG_SMP=y this falls out as a consequence of using sequentially
consistent atomic operations to ensure all processors are locked out.
With CONFIG_SMP=n a spinlock uses arch_irq_lock/unlock(), so the barrier
behavior must come from that function.

As arch_irq_lock/unlock() delegates to irq_lock/unlock() for
documentation, document the barrier requirement there.

Signed-off-by: default avatarPeter Bigot <peter.bigot@nordicsemi.no>
parent 3102f3b0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment