Compare commits
No commits in common. "c9a92819b4b92269e145ce75e7e7a32e0d5669fb" and "9c89433db5d51bb9fc5d97a551ec9ee9c8fa5b67" have entirely different histories.
c9a92819b4
...
9c89433db5
@ -5,8 +5,6 @@
|
|||||||
|
|
||||||
u16 fork(void)
|
u16 fork(void)
|
||||||
{
|
{
|
||||||
if (current_task->esp == current_task->esp0 + STACK_SIZE)
|
|
||||||
scheduler();
|
|
||||||
cli();
|
cli();
|
||||||
struct task *child = create_task(current_task->uid);
|
struct task *child = create_task(current_task->uid);
|
||||||
if (!child)
|
if (!child)
|
||||||
@ -18,5 +16,5 @@ u16 fork(void)
|
|||||||
asm("movl %%esp, %0" : "=m"(daddy_esp));
|
asm("movl %%esp, %0" : "=m"(daddy_esp));
|
||||||
child->esp = child->esp0 + (daddy_esp - current_task->esp0);
|
child->esp = child->esp0 + (daddy_esp - current_task->esp0);
|
||||||
toris();
|
toris();
|
||||||
return current_task == child ? 0 : child->pid;
|
return current_task == child ? 0 : child->uid;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user