lib: c: rt: call task_exit once main() returns
This commit is contained in:
@@ -6,6 +6,9 @@
|
|||||||
.extern main
|
.extern main
|
||||||
.type main, @function
|
.type main, @function
|
||||||
|
|
||||||
|
.extern task_exit
|
||||||
|
.type task_exit, @function
|
||||||
|
|
||||||
_start:
|
_start:
|
||||||
# Args (as provided by the ABI)
|
# Args (as provided by the ABI)
|
||||||
# %rdi: int argc
|
# %rdi: int argc
|
||||||
@@ -13,4 +16,7 @@ _start:
|
|||||||
# %rdx: kern_handle_t task
|
# %rdx: kern_handle_t task
|
||||||
# %rcx: kern_handle_t address_space
|
# %rcx: kern_handle_t address_space
|
||||||
call main
|
call main
|
||||||
|
|
||||||
|
mov %rax, %rdi
|
||||||
|
call task_exit
|
||||||
1: jmp 1b
|
1: jmp 1b
|
||||||
|
|||||||
Reference in New Issue
Block a user