Skip to content

Commit

Permalink
kernel: poll: Allow 0 event for submitted work
Browse files Browse the repository at this point in the history
Change:
    commit cc6317d
    Author: Jukka Rissanen <[email protected]>
    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 artivical events.

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

Signed-off-by: David Brown <[email protected]>
  • Loading branch information
d3zd3z committed Jan 10, 2025
1 parent 337d271 commit fe074f0
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, "zero events\n");

SYS_PORT_TRACING_FUNC_ENTER(k_work_poll, submit_to_queue, work_q, work, timeout);

Expand Down

0 comments on commit fe074f0

Please sign in to comment.