Commit Graph

1 Commits

Author SHA1 Message Date
Andy Ross 7a023cfb89 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: Andy Ross <andrew.j.ross@intel.com>
2018-02-16 10:44:29 -05:00