kernel: poll: Allow 0 events for submitted work

Change:
    commit cc6317d7ac
    Author: Jukka Rissanen <jukka.rissanen@linux.intel.com>
    Date:   Fri Nov 1 14:03:32 2019 +0200

        kernel: poll: Allow 0 event input

Allows `k_poll` to be user with 0 events, which is useful for allowing just
a sleep without having to create artificial events.

Allow the same for `k_work_submit_to_queue()` and `k_work_submit()`.

Signed-off-by: David Brown <david.brown@linaro.org>
This commit is contained in:
David Brown 2025-01-10 13:06:28 -07:00 committed by Benjamin Cabé
commit 19a376aa88

View file

@ -665,7 +665,7 @@ int k_work_poll_submit_to_queue(struct k_work_q *work_q,
__ASSERT(work_q != NULL, "NULL work_q\n");
__ASSERT(work != NULL, "NULL work\n");
__ASSERT(events != NULL, "NULL events\n");
__ASSERT(num_events > 0, "zero events\n");
__ASSERT(num_events >= 0, "<0 events\n");
SYS_PORT_TRACING_FUNC_ENTER(k_work_poll, submit_to_queue, work_q, work, timeout);