Skip to content
Commit 7a023cfb authored by Andy Ross's avatar Andy Ross Committed by Anas Nashif
Browse files

kernel: Simple spinlock API



Minimal spinlock API based on the existing atomic.h layer.  Usage
works just like irq_lock(), but takes an argument to a specific struct
k_spinlock_t to un/lock.  No attempt at implementing fairness or
backoff semantics.  No attempt made at architecture-specific assembly.

When CONFIG_SMP is not enabled, this code falls back to a zero-size
struct and becomes functionally identical to irq_lock/unlock().

Signed-off-by: default avatarAndy Ross <andrew.j.ross@intel.com>
parent d3376f27
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment