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

kernel: Make irq_{un}lock() APIs into a global spinlock in SMP mode



In SMP mode, the idea of a single "IRQ lock" goes away.  Long term,
all usage needs to migrate to spinlocks (which become simple IRQ locks
in the uniprocessor case).  For the near term, we can ease the
migration (at the expense of performance) by providing a compatibility
implementation around a single global lock.

Note that one complication is that the older lock was recursive, while
spinlocks will deadlock if you try to lock them twice.  So we
implement a simple "count" semantic to handle multiple locks.

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