signals: more general changes

This commit is contained in:
Matheus
2024-05-17 18:48:57 -03:00
parent 7b0cc4c51b
commit 1b63e9b436
13 changed files with 135 additions and 54 deletions
+1
View File
@@ -1,6 +1,7 @@
section .text
global arch_context_switch
arch_context_switch:
xor rsi, rsi ; is syscall? (no)
extern sched_userspacecheck
call sched_userspacecheck ; compiled with no_caller_saved_registers
+5 -1
View File
@@ -226,7 +226,11 @@ arch_syscall_entry:
mov rdi, rsp
add rdi, 8 ; context pointer is after r9 argument
extern sched_userspacecheck
xor rsi, rsi
inc rsi ; is syscall? (yes)
; errno already in rdx
mov rcx, rax ; return value
extern sched_userspacecheck ; context, return, errno
call sched_userspacecheck ; compiled with __attribute__((no_caller_saved_registers))
; restore context