Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sched/wqueue/kwork_queue.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ static int work_qqueue(FAR struct kwork_wqueue_s *wqueue,

/* Preserve regular queue timing across lock contention. */

if (!period)
if (!period && delay > 0)

@casaroli casaroli Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With delay 0, qtime now stays 0. work_queue_next() adds the period to the old qtime (line 115), so a work queued with delay 0 that re-arms with work_queue_next() (sim_rptun.c:500/452, sim_rpmsg_virtio.c:251/188) runs back to back until it catches up with the current tick.

Fix: keep setting qtime to the current tick for delay 0, as libs/libc/wqueue/work_queue.c:124 does.

{
expected = clock_delay2abstick(delay);
}
Expand Down
Loading