lib: c: rt: call task_exit once main() returns

This commit is contained in:
2026-03-21 10:44:21 +00:00
parent 32d0606d16
commit a041bc55db

View File

@@ -6,6 +6,9 @@
.extern main
.type main, @function
.extern task_exit
.type task_exit, @function
_start:
# Args (as provided by the ABI)
# %rdi: int argc
@@ -13,4 +16,7 @@ _start:
# %rdx: kern_handle_t task
# %rcx: kern_handle_t address_space
call main
mov %rax, %rdi
call task_exit
1: jmp 1b