This is an automated email from the ASF dual-hosted git repository. acassis pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 7500e7a5dfb58c791b834b9e8c33de8cfc3e4da1 Author: Marco Casaroli <[email protected]> AuthorDate: Thu Nov 26 17:33:19 2026 +0100 Documentation/wqueue: Describe the timer of the kernel work queue. Say that the timer is an hrtimer with CONFIG_HRTIMER and a watchdog timer without it, and that an SMP system that queues or cancels work in the critical section must enable CONFIG_HRTIMER. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Marco Casaroli <[email protected]> --- Documentation/os/scheduling/wqueue.rst | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Documentation/os/scheduling/wqueue.rst b/Documentation/os/scheduling/wqueue.rst index cb390d6365c..282f14b66c0 100644 --- a/Documentation/os/scheduling/wqueue.rst +++ b/Documentation/os/scheduling/wqueue.rst @@ -176,6 +176,22 @@ all build modes. - ``CONFIG_LIBC_USRWORKSTACKSIZE``. The stack size allocated for the lower priority worker thread. Default: 2048. +Kernel Work Queue Timer +----------------------- + +A kernel work queue starts a timer for its first delayed work item. With +``CONFIG_HRTIMER``, the timer is a high-resolution timer. Without it, the +timer is a watchdog timer. + +The work queue holds its spinlock while it starts or cancels the timer. +A watchdog timer enters the critical section, and code in the critical +section can call ``work_queue()`` or ``work_cancel()``. On SMP, two CPUs +can then wait for each other. A high-resolution timer has its own lock, +so this cannot occur. Enable ``CONFIG_HRTIMER`` on an SMP system that +queues or cancels work in the critical section. + +The work queue wakes its worker threads after it releases its spinlock. + Common Work Queue Interfaces ============================
