33bcea4eff
Call critical_enter/critical_exit around (fast) interrupt handlers. All non-threaded interrupts are fast, and the threaded interrupt scheduler is itself a fast interrupt. Assert that an interrupt handler we are about to call is non-zero. Be paranoid about restoring the users global registers. Do it as the last thing before switching to alternate globals (when we magically get our preloaded registers back), and do it with interrupts disabled. Any kind of kernel trap when the globals are not setup properly is bad news. Don't save and restore the kernel g6, it invariably points to the current pcb now.