Skip to content

Commit

Permalink
kernel: poll: Allow 0 events for submitted work
Browse files Browse the repository at this point in the history
Change:
    commit cc6317d
    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>
  • Loading branch information
d3zd3z committed Jan 15, 2025
1 parent 337d271 commit 244d60a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/poll.c
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,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);

Expand Down

0 comments on commit 244d60a

Please sign in to comment.