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