watched_tasks: improve error handling in spawned tasks and threads#48
Merged
Conversation
Member
Author
|
The failed |
6cc296f to
9d9ceb8
Compare
Member
Author
|
Assigned to myself because #47 (which this is based on) still needs some work on my side. |
cf2851d to
61bfafe
Compare
Member
Author
|
Pull request #58 has changed the logic in |
ae48497 to
c14e10f
Compare
Member
Author
|
I've resolved the merge conflicts now and have also split the changes into a few more commits. |
Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de>
The operating system call to set the GPIO output state may fail. Make sure that this results in an orderly teardown of the tacd instead of a panic. This also necessitates a change to the test and demo_mode gpio stubs, so they can be `?`-operatored into anyhow Results (simply by making them anyhow results). Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de>
Since we can now return early from `wtb.spawn_thread`-spawned threads, because they handle error propagation out of the thread context for us we no longer have to use queues to send back error results manually. Use that to simplify error handling in the thread setup and the steady state. Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de>
Now that errors from threads are properly propagated we can simplify the error handling and do not have to transfer `Result`s across queues if something goes wrong during thread setup. Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de>
Emantor
approved these changes
Jun 25, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds some of the improved error handling that is hinted at in #47. For now that means:
src/dut_power.rssrc/adc/iio/hardware.rsTodo
[ ] Find even more places where error handling in tasks can be improvedWe can do that in subsequent PRs
Related Pull Requests
This PR is based on another PR that should be merged first: