-
Notifications
You must be signed in to change notification settings - Fork 2k
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
sys/bhp_msg: add IPC based implementation of Bottom Half Processor #18464
Conversation
This is a bad idea. Messages sent from ISR silently vanish if the receiver is not waiting (in The effect would be easy to show with a unit test that calls I'm beginning to think we should deprecate |
As discussed in many old PRs, I was never a fan of ISR offloading using IPC and I 100% agree with what you describe. I plan to migrate all the remaining IPC based IRQ Offloading modules to Events or Thread Flags at some point. |
OK I see, this is needed because LWIP uses msg already for netdev events and this will integrate with it. |
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.
Code looks good, but there should be some explanation as to when bhp_event
and when bhp_msg
should be used.
CI has some comments too.
done! |
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.
Static tests are still failing
Please squash! |
squashed! |
Contribution description
This PR adds an IPC version of the
bhp
module. It allows device independent IRQ offloading using message queues.A
bhp_msg_t
descriptor holds the PID of a thread that performs Bottom Half processing on reception of a message with a dedicated type. Similar to #18435, this mechanism can be adapted to existinginit
functions of drivers to hook in IRQ offloading.Testing procedure
tests/unittests
should pass.Issues/PRs references
#18435
Required for adding LWIP support for radios that require IRQ offloading