Repository navigation
userlib: Add halt() helper, detect this in the host kernel - #2780
Merged
Merged
Conversation
This tweaks the jefe task to allow for host builds, and adds it to the demo app. Ping/Pong actually works as expected now.
Previously, there were some annoying `Eof:` errors printed by tasks when the kernel stopped. This PR adds some in-band signaling to allow the kernel to tell tasks it's time to shut down.
This formalizes the "I'm dead and don't restart me" behavior used in various places in the code by adding a `userlib::hl` helper for it. We also can now detect this on host runs, halting the host system if something fatal has occurred. Also adds a flag to opt-out of this new behavior if you are testing something that SHOULD do that.
jamesmunns
force-pushed
the
james/host-detect-dead
branch
from
November 11, 2026 14:50
9440277 to
fd2be56
Compare
labbott
approved these changes
Nov 11, 2026
labbott
left a comment
Collaborator
There was a problem hiding this comment.
I don't love fn halt as a name for nebulous reasons but I also don't actually have serious objections or a better name (we can see if anyone else does?)
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 formalizes the "I'm dead and don't restart me" behavior used in various places in the code by adding a
userlib::hlhelper for it.We also can now detect this on host runs, halting the host system if something fatal has occurred. Also adds a flag to opt-out of this new behavior if you are testing something that SHOULD do that.
Stacked on top of #2778 and #2779.