void * switch_kernel_to_user() { if (current==NULL) { return 0; } next_process(); return current->process->regs; }
/* * Choose a new process to run. This function is called from schedule() * in entry.S. */ struct pcb *_schedule(void) { return (current = next_process()); }