Fix fork() for new task switching model
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ fork:
|
||||
push rbp
|
||||
mov rbp, rsp
|
||||
|
||||
mov rax, 0x00
|
||||
mov rax, 0x03
|
||||
syscall ; pid left in rax
|
||||
|
||||
pop rbp
|
||||
|
||||
Reference in New Issue
Block a user