Skip to content
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

zbus: assert when inside an ISR and time out is not zero #84162

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

brandon-exact
Copy link
Contributor

@brandon-exact brandon-exact commented Jan 17, 2025

Currently various zbus functions silently change the timeout
to zero when inside an ISR. If a developer is not aware
of this it could lead to unexpected behaviour or a
publish/read/notify failing.

Also in the zbus docs it states to only use a timeout of
zero when inside a ISR multiple times.

subsys/zbus/zbus.c Outdated Show resolved Hide resolved
subsys/zbus/zbus.c Outdated Show resolved Hide resolved
subsys/zbus/zbus.c Outdated Show resolved Hide resolved
subsys/zbus/zbus.c Outdated Show resolved Hide resolved
subsys/zbus/zbus.c Outdated Show resolved Hide resolved
subsys/zbus/zbus.c Outdated Show resolved Hide resolved
subsys/zbus/zbus.c Outdated Show resolved Hide resolved
subsys/zbus/zbus.c Outdated Show resolved Hide resolved
subsys/zbus/zbus.c Outdated Show resolved Hide resolved
Currently various zbus functions silently change the timeout
to zero  when inside an ISR. If a developer is not aware
of this it could lead to unexpected behaviour or a
publish/read failing.

Also in the zbus docs it states to only use a timeout of
zero when inside a ISR multiple times.

Signed-off-by: Brandon Allen <[email protected]>
@rodrigopex
Copy link
Contributor

@brandon-exact , thanks for the contribution 🎉 🎉 🎉! I am glad to see new faces helping out zbus and Zephyr.

@rodrigopex rodrigopex requested a review from pdgendt January 17, 2025 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants