Re: context switch vs. signal delivery [was: Re: Accelerating user mode

Jeff Dike
2002-08-05T23:39:19Z

us15@os.inf.tu-dresden.de said:
> Task wants to do a syscall (i.e. int 0x30 in Fiasco), the kernel
> process tracing the task sees the signal in its SIGCHLD handler. It
> pulls the registers out of the task's address space using
> PTRACE_GETREGS and sets up an interrupt frame on the kernel stack.

Hmmm, I would have the kernel process let the system call bump it out of
wait() rather than delivering a SIGCHLD. And, I'd be inclined to lomgjmp
over to the kernel stack.

Or, even better, have it already running on the appropriate kernel stack,
so it can just read the system call from PTRACE_GETREGS and call into the
main kernel.

Similarly, with other signals, like the timer, SIGIO, or page faults, it
would just annull the signal and call into the IRQ system. Although page
faults will be difficult because of the inability to read err or cr3, as
you've pointed out.

Jeff