Fix fork() for new task switching model

This commit is contained in:
Justin C. Miller
2019-04-03 10:08:26 -07:00
parent 8375870af6
commit c605793a9d
13 changed files with 172 additions and 97 deletions

View File

@@ -16,11 +16,9 @@ int
main(int argc, const char **argv)
{
int32_t pid = getpid();
int32_t child = fork();
message("hello from nulldrv!");
//int32_t child = fork();
//debug();
for (int i = 1; i < 5; ++i)
sleep(i*10);
debug();
return 0;
}

View File

@@ -44,7 +44,7 @@ fork:
push rbp
mov rbp, rsp
mov rax, 0x00
mov rax, 0x03
syscall ; pid left in rax
pop rbp