Skip to content

Commit

Permalink
x86_64: signal trampoline code
Browse files Browse the repository at this point in the history
  • Loading branch information
jewelcodes committed Nov 20, 2024
1 parent c2d873d commit 22fe384
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions src/platform/x86_64/ipc/sigstub.asm
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

; lux - a lightweight unix-like operating system
; Omar Elghoul, 2024

[bits 64]

; Signal Trampoline Code
; this simply invokes the sigreturn() system call to allow the kernel to
; restore the state of the thread before the signal was raised

SYSCALL_SIGRETURN equ 49

section .data

global sigstub
align 16
sigstub:
mov rax, SYSCALL_SIGRETURN
syscall

sigstubEnd:

global sigstubSize
align 16
sigstubSize: dq sigstubEnd - sigstub

0 comments on commit 22fe384

Please sign in to comment.