fix: task: use 8bit represent ptr instead of 32 to fix stack ptr
This commit is contained in:
@ -12,7 +12,7 @@ u16 fork(void)
|
||||
child->daddy = current_task;
|
||||
current_task->child = child;
|
||||
memcpy(child->esp0, current_task->esp0, STACK_SIZE);
|
||||
u32 *daddy_esp = 0;
|
||||
u8 *daddy_esp;
|
||||
asm("movl %%esp, %0" : "=m"(daddy_esp));
|
||||
child->esp = child->esp0 + (daddy_esp - current_task->esp0);
|
||||
toris();
|
||||
|
Reference in New Issue
Block a user