mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-30 22:18:21 +00:00
add a function that gets called after every system call and make all threads quit on program exit
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
#include <kernel/sched.h>
|
||||
|
||||
void postsyscall(){
|
||||
sched_threadexitcheck();
|
||||
}
|
||||
@@ -175,22 +175,29 @@ asm_syscall_entry:
|
||||
|
||||
call [func_table + rax * 8]
|
||||
|
||||
; restore entry state
|
||||
|
||||
push rax
|
||||
push rdx
|
||||
|
||||
; DEBUG STUFF
|
||||
|
||||
;push rax
|
||||
;push rdx
|
||||
|
||||
;mov rsi,rdx
|
||||
;mov rdi,r15
|
||||
;extern syscalllogger
|
||||
;call syscalllogger
|
||||
|
||||
;pop rdx
|
||||
;pop rax
|
||||
|
||||
extern postsyscall
|
||||
call postsyscall
|
||||
|
||||
|
||||
; DEBUG STUFF END
|
||||
|
||||
pop rdx
|
||||
pop rax
|
||||
|
||||
|
||||
|
||||
|
||||
; restore entry state
|
||||
|
||||
mov r11, 0x43 ; user data
|
||||
mov es,r11
|
||||
|
||||
Reference in New Issue
Block a user