docs: Improved description of context switch

main
Sean McBride 4 years ago
parent 64f13d40ae
commit 3bfb3859c1

@ -144,8 +144,9 @@ worker_thread_process_io(void)
} }
/** /**
* Sends the current thread a SIGUSR1, causing a preempted sandbox to be restored * We need to switch back to a previously preempted thread. The only way to restore all of its registers is to use
* Invoked by asm during a context switch * sigreturn. To get to sigreturn, we need to send ourselves a signal, then update the registers we should return to,
* then sigreturn (by returning from the handler).
*/ */
void __attribute__((noinline)) __attribute__((noreturn)) worker_thread_sandbox_switch_preempt(void) void __attribute__((noinline)) __attribute__((noreturn)) worker_thread_sandbox_switch_preempt(void)
{ {

Loading…
Cancel
Save