-
Notifications
You must be signed in to change notification settings - Fork 643
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
modules: hal_nordic: nRF 802.15.4 customizable asserts #1411
Conversation
2e91f30
to
74b2a60
Compare
74b2a60
to
7c0d57e
Compare
#ifdef CONFIG_USERSPACE | ||
/* User threads aren't allowed to induce kernel panics; generate | ||
* an oops instead. | ||
*/ | ||
if (k_is_user_context()) { |
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.
Why k_panic()
is used here at all? Isn't k_oops()
a better choice?
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.
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'm not convinced a driver fault is considered a kernel fault. But I won't block this PR because of this.
#ifdef CONFIG_USERSPACE | ||
/* User threads aren't allowed to induce kernel panics; generate | ||
* an oops instead. | ||
*/ | ||
if (k_is_user_context()) { |
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'm not convinced a driver fault is considered a kernel fault. But I won't block this PR because of this.
7c0d57e
to
ed3e823
Compare
ed3e823
to
8fa697c
Compare
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.
This is awesome! Thank you for contribution! LGTM 👍
8fa697c
to
67b4158
Compare
67b4158
to
42cc3aa
Compare
Recent nRF 802.15.4 Radio Driver provides assert abstraction layer. The assert abstraction layer is implemented in Zephyr in following ways depending on the `NRF_802154_ASSERT_CHOICE` Kconfig choice. `NRF_802154_ASSERT_ZEPHYR_MINIMAL` (default) gives ability to still perform run-time checking of the nRF 802.15.4 Radio Driver operation with minimum memory overhead and configurable behavior on fault detection regardless of the `CONFIG_ASSERT` Kconfig option value. `NRF_802154_ASSERT_ZEPHYR` gives ability to use asserts provided and configurable by Zephyr including the ability to turn off the run-time checking of the nRF 802.15.4 Radio Driver operation. Signed-off-by: Andrzej Kuroś <[email protected]> (cherry picked from commit f5337fc)
42cc3aa
to
46b1970
Compare
Recent nRF 802.15.4 Radio Driver provides assert abstraction layer. The assert abstraction layer is implemented in Zephyr in following ways depending on the
NRF_802154_ASSERT_CHOICE
Kconfig choice.NRF_802154_ASSERT_ZEPHYR_MINIMAL
(default) gives ability to still perform run-time checking of the nRF 802.15.4 Radio Driver operation with minimum memory overhead and configurable behavior on fault detection regardless of theCONFIG_ASSERT
Kconfig option value.NRF_802154_ASSERT_ZEPHYR
gives ability to use asserts provided and configurable by Zephyr including the ability to turn off the run-time checking of the nRF 802.15.4 Radio Driver operation.Related JIRA ticket: KRKNWK-18116