-
Notifications
You must be signed in to change notification settings - Fork 6.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
kernel: poll: Allow 0 events for submitted work #83829
Conversation
@@ -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"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo in commit msg, s/artivical/artificial/
kernel/poll.c
Outdated
@@ -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"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't the message now a bit misleading as we allow zero events, should this be something like invalid event count
or similar?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would suggest addressing the comment made by @jukkar since it doesn't really make sense to leave this mistake there now that it's been spotted
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>
244d60a
@andyross @peter-mitsis refresh +1? Thanks! 😊 |
Change:
commit cc6317d
Author: Jukka Rissanen jukka.rissanen@linux.intel.com
Date: Fri Nov 1 14:03:32 2019 +0200
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()
andk_work_submit()
.