-
Notifications
You must be signed in to change notification settings - Fork 8.2k
boards: posix: native_posix: Handle SDL events in zephyr thread #50411
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
boards: posix: native_posix: Handle SDL events in zephyr thread #50411
Conversation
Just for info: The native_posix main thread is a separate thread than the Zephyr SW threads. If you call Zephyr APIs from it, you confuse the Zephyr kernel :) |
That is exactly the problem :) |
d535cc2 to
48e312b
Compare
aescolar
left a comment
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.
You can still define a kconfig option for the delay :), just not a too tiny amount
This commit introduces a zephyr thread for SDL events. This allows to use zephyr mutex locking with SDL callbacks. Signed-off-by: Pieter De Gendt <[email protected]>
48e312b to
17c7089
Compare
|
@aescolar FYI when enabling |
Would you so kind as to send a PR to fix it? |
Done #50416 |
This commit introduces a zephyr thread for SDL events. This allows to use zephyr mutex locking with SDL callbacks.
Relates to #50080; as this calls
gpio_emul_input_setwhich locks a mutex, and asserts if called from an idle thread (which apparently is the case for the posix main thread).