nuttx/sched/wqueue
DuoYuWang d2e01b9055 sched/wqueue: harden custom queue lifecycle
Prevent work_queue_free() from destroying predefined queues or freeing a
custom queue from one of its own callbacks.  Mark teardown under the queue
lock, reject new submissions, return pending work to its owner, and wait for
every worker before releasing queue resources.

Clean up partially created worker pools, reject invalid delays, safely
replace pending periodic work, and make synchronous cancellation wait for
every concurrent callback using the same work structure.

Tested on an STM32H7 PX4 FMUv6C with the matching ostest suite in Flat and
Protected kernel builds.

Assisted-by: Codex:GPT-5
Signed-off-by: DuoYuWang <thirteenking.wang@gmail.com>
2026-09-04 23:02:48 +08:00
..
CMakeLists.txt sched/wqueue: add configuring the stack of an hpwork/lpwork as static 2026-01-27 10:18:24 +08:00
kwork_cancel.c sched/wqueue: harden custom queue lifecycle 2026-09-04 23:02:48 +08:00
kwork_inherit.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
kwork_notifier.c sched/wqueue: Replace spinlock/sched_lock with spin_lock_irqsave_nopreempt 2025-10-31 15:02:56 +08:00
kwork_queue.c sched/wqueue: harden custom queue lifecycle 2026-09-04 23:02:48 +08:00
kwork_thread.c sched/wqueue: harden custom queue lifecycle 2026-09-04 23:02:48 +08:00
Make.defs sched/wqueue: add configuring the stack of an hpwork/lpwork as static 2026-01-27 10:18:24 +08:00
wqueue.h sched/wqueue: harden custom queue lifecycle 2026-09-04 23:02:48 +08:00