Skip to content
Commit 82a9bc45 authored by Måns Ansgariusson's avatar Måns Ansgariusson Committed by Benjamin Cabé
Browse files

kernel: Add support for stopping workqueues



This patch adds support for stopping workqueues. This is useful for freeing
resources from workqueues when subsystems/modules is deactivated or
cleaning up the system between tests in ztest to reach a fully normalized
state.

The patch adds a new function k_work_queue_stop() that releases the
workqueues thread and stack when a workqueue is unwanted.
k_work_queue_stop(...) should be viewed as a counterpart to
k_work_queue_start(...).

This would allow to:
k_work_queue_start(...);

k_work_drain(..., true);
k_work_queue_stop(...);

Signed-off-by: default avatarMåns Ansgariusson <Mansgariusson@gmail.com>
parent 2907a961
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment