|
@@ -151,12 +151,10 @@ void new_thread_handler(void)
|
|
* 0 if it just exits
|
|
* 0 if it just exits
|
|
*/
|
|
*/
|
|
n = run_kernel_thread(fn, arg, ¤t->thread.exec_buf);
|
|
n = run_kernel_thread(fn, arg, ¤t->thread.exec_buf);
|
|
- if (n == 1) {
|
|
|
|
- /* Handle any immediate reschedules or signals */
|
|
|
|
- interrupt_end();
|
|
|
|
|
|
+ if (n == 1)
|
|
userspace(¤t->thread.regs.regs);
|
|
userspace(¤t->thread.regs.regs);
|
|
- }
|
|
|
|
- else do_exit(0);
|
|
|
|
|
|
+ else
|
|
|
|
+ do_exit(0);
|
|
}
|
|
}
|
|
|
|
|
|
/* Called magically, see new_thread_handler above */
|
|
/* Called magically, see new_thread_handler above */
|
|
@@ -175,9 +173,6 @@ void fork_handler(void)
|
|
|
|
|
|
current->thread.prev_sched = NULL;
|
|
current->thread.prev_sched = NULL;
|
|
|
|
|
|
- /* Handle any immediate reschedules or signals */
|
|
|
|
- interrupt_end();
|
|
|
|
-
|
|
|
|
userspace(¤t->thread.regs.regs);
|
|
userspace(¤t->thread.regs.regs);
|
|
}
|
|
}
|
|
|
|
|