kernel/work_q: Spinlockify

Each work_q object gets a separate spinlock to synchronize access
instead of the global lock.  Note that there was a recursive lock
condition in k_delayed_work_cancel(), so that's been split out into an
internal unlocked version and the API entry point that wraps it with a
lock.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
This commit is contained in:
Andy Ross 2018-07-24 11:26:43 -07:00 committed by Anas Nashif
commit a37a981b21
3 changed files with 33 additions and 22 deletions

View file

@ -2526,6 +2526,7 @@ typedef void (*k_work_handler_t)(struct k_work *work);
struct k_work_q {
struct k_queue queue;
struct k_thread thread;
struct k_spinlock lock;
};
enum {