- Process *old_process;
-
- TRACEMSG("storing %p:%s", CurrentProcess, CurrentProcess->monitor.name);
- CurrentProcess->leaving = false;
- getcontext(&CurrentProcess->context);
- /* We get here in two ways: directly, and after setcontext() below */
-
- if (CurrentProcess->leaving)
- {
- TRACEMSG("leaving to %p:%s", CurrentProcess, CurrentProcess->monitor.name);
- return;
- }
-
- old_process = CurrentProcess;
-
- irq_handlers[signum]();
-
- if (old_process != CurrentProcess)
- {
- TRACEMSG("launching %p:%s", CurrentProcess, CurrentProcess->monitor.name);
- CurrentProcess->leaving = true;
- setcontext(&CurrentProcess->context);
- /* not reached */
- }
-
- TRACEMSG("keeping %p:%s", CurrentProcess, CurrentProcess->monitor.name);