Conversation
55527e3 to
881525a
Compare
We will need to reuse this structure to foward the state of the registers to the userland signal handler. While at it, rename the 'stub' field in the interrupt_frame struct to 'regs' to make the name more explicit. Same for the 'state' field, that was renamed to 'frame' since it contains the original interupt frame pushed by hardware.
Also rename the other linked list node structures inside struct process.
526927f to
310a3d0
Compare
This commit adds support for the follwing POSIX syscalls: - sigaction() - sigprocmask() - sigpending() What is still missing in this implementation: - Support for process pausing and continuing - Support for real time syscalls
From POSIX.1-2024:
The value of status may be 0, EXIT_SUCCESS, EXIT_FAILURE,
or any other value, though only the least significant 8 bits
(that is, status & 0377) shall be available from wait() and
waitpid();
Compute and store the final value in sys_exit() to make regular
exits distinguishable from ones caused by a signal.
This commit defines a few default interrupt handlers that simply generates the appropriate POSIX signal when a fault occurs. Such errors should only ever be allowed for userland code. As such, the handlers call the panic fnuction if the faulting process was running in kernel mode. Link: https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/signal.h.html
Newlib's configure script hardcodes a few system header directories that are included before our own header. Patch the configure script to be able to insert our own system headers (in first place to be able to use #include_next). Despite this we are still unable to access our own header directly in syscalls.c (i have no clue why), so we had to come up with a little trick until we find a proper solution.
Also implement BSD's killpg() which is defined but not implemented by newlib.
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.
No description provided.