wip: fork and wait are almost working (missing child's stack)

This commit is contained in:
2025-01-28 15:44:09 +01:00
parent e60969b37a
commit 1ca8c68cf5
5 changed files with 23 additions and 12 deletions

View File

@ -3,7 +3,15 @@
u16 wait(void)
{
if (current_task->child == NULL)
return -1;
cli();
if (current_task->child->status == ZOMBIE)
current_task->child->status = STOPPED;
else
current_task->status = WAIT;
u16 child_pid = current_task->child->pid;
toris();
return 0;
scheduler();
return child_pid;
}