]> git.corax.cc Git - corax/commit
Implement mechanism to deliver hardware interrupts to userspace processes by
authorMatthias Kruk <m@m10k.eu>
Tue, 14 Jan 2020 12:23:45 +0000 (21:23 +0900)
committerMatthias Kruk <m@m10k.eu>
Tue, 14 Jan 2020 12:23:45 +0000 (21:23 +0900)
commitb18e30fb75e90608f9daf8cd2d05f92216ca9d0b
treecf1af4ace0fc772bac8db559877c2a7be67289a1
parent8153a6e7e78c922bb6e409c4080f090e1a97efe2
Implement mechanism to deliver hardware interrupts to userspace processes by
co-opting the sigaction() syscall in combination with a new signal, SIGHWINT.
The signal mask that is passed to sigaction() by means of a struct sigaction
is used to notify the kernel which interrupts the process would like to receive.
Processes that choose to use the same handler for multiple hardware interrupts
should set the SA_SIGINFO flag in the sigaction structure. The interrupt handler
will then be passed an additional siginfo_t structure (and a struct ucontext*)
which can be used to find out the hardware interrupt number by inspecting the
siginfo_t structure's si_trapno member.
config.h
kernel/arch/interrupt.c
kernel/core/Makefile
kernel/core/posixcall.c
kernel/core/process.c
kernel/core/signal.c [new file with mode: 0644]