fix(syscalls/proc): sys_exit and sys_wait now returns code and pid respectively
This commit is contained in:
@@ -11,6 +11,7 @@ extern task* curr_task;
|
||||
u64 sys_exit(i32 code) {
|
||||
kprintf("\n[Dewar] process %s exited with code %d", curr_task->proc->name, code);
|
||||
sched_exit();
|
||||
return code;
|
||||
}
|
||||
|
||||
|
||||
@@ -20,4 +21,5 @@ u64 sys_spawn(const char* path) {
|
||||
|
||||
u64 sys_wait(u64 pid) {
|
||||
sched_block(pid);
|
||||
return pid;
|
||||
}
|
||||
|
||||
@@ -3,6 +3,8 @@ project(libterm LANGUAGES C ASM_NASM)
|
||||
|
||||
set(USER_C_FLAGS
|
||||
-ffreestanding
|
||||
-fno-builtin
|
||||
-Wno-incompatible-library-redeclaration # stfu
|
||||
-nostdlib
|
||||
-nostdinc
|
||||
-fno-stack-protector
|
||||
|
||||
Reference in New Issue
Block a user