mirror of
https://github.com/justinian/jsix.git
synced 2025-12-10 00:14:32 -08:00
[kernel] Remove process & thread self-handles
For the coming switch to cap/handle ref-counting being the main lifetime determiner of objects, get rid of self handles for threads and processes to avoid circular references. Instead, passing 0 to syscalls expecting a thread or process handle signifies "this process/thread".
This commit is contained in:
@@ -5,15 +5,21 @@ extern __init_libc
|
||||
|
||||
global _start:function (_start.end - _start)
|
||||
_start:
|
||||
mov rbp, rsp
|
||||
mov rdi, rsp
|
||||
call __init_libj6
|
||||
call __init_libc
|
||||
push 0 ; Add null frame
|
||||
push 0
|
||||
mov rbp, rsp
|
||||
|
||||
pop rdi
|
||||
mov rsi, rsp
|
||||
call main
|
||||
call __init_libj6
|
||||
mov rbx, rax
|
||||
|
||||
mov rdi, rax
|
||||
call exit
|
||||
call __init_libc
|
||||
|
||||
pop rdi
|
||||
mov rsi, rsp
|
||||
mov rdx, 0 ; TODO: actually parse stack for argc, argv, envp
|
||||
mov rcx, rbx
|
||||
call main
|
||||
|
||||
mov rdi, rax
|
||||
call exit
|
||||
.end:
|
||||
|
||||
Reference in New Issue
Block a user