Subkernel: handle subkernel exceptions in (sub)kernel #2455
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.
ARTIQ Pull Request
Description of Changes
As discussed in another PR about documentation, it's not the best situation if the subkernel await/message pass throws an exception if it cannot be caught. So the exception is extracted from the message (in a way that's still compatible with ARTIQ-8) and sent to the kernel CPU, taking inspiration from RPC.
One caveat is that at the moment exception raised by subkernel called by another subkernel (k->sk1->sk2*) will still not be handled within the first subkernel. Only the main kernel can handle it at the moment, as subkernels only pass the exception source when one arises, rather than the whole exception data.
Tested with a Kasli 2.0 + 1.1 sat with following code:
For testing raising subkernel exceptions within subkernels:
Tested with Kasli SoC master -> 2.0 sat -> 1.1 sat, and SoC master -> SoC sat -> 1.1 sat
Type of Changes
Steps (Choose relevant, delete irrelevant before submitting)
All Pull Requests
Code Changes
Git Logistics
git rebase --interactive
). Merge/squash/fixup commits that just fix or amend previous commits. Remove unintended changes & cleanup. See tutorial.git show
). Format:Licensing
See copyright & licensing for more info.
ARTIQ files that do not contain a license header are copyrighted by M-Labs Limited and are licensed under LGPLv3+.