mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-29 05:38:21 +00:00
signals: more general changes
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user