--- /dev/null
+#include <lunaix/syscallid.h>
+
+.section .text
+ /*
+ stack structure:
+
+ ...saved_state \
+ void* sighand; > struct siguctx
+ void* sigact; /
+ int sig_num; <--- %rsp
+ */
+ .global sigtrampoline
+ sigtrampoline:
+ movq %rsp, %rax
+ andq $-16, %rsp
+ pushq %rax
+
+ movl (%rax), %edi // signum
+ xorq %rsi, %rsi // siginfo = NULL
+ leaq 4(%rax), %rdx // (struct siguctx*)&sigact
+ call sig_dohandling
+
+ movq $__SYSCALL_sigreturn, %rax
+ popq %rbx
+ int $33
+
+ .global th_trampoline
+ th_trampoline:
+ movq (%rsp), %rax
+ movq 8(%rsp), %rdi
+
+ callq %rax
+
+ movq %rax, %rbx
+ movq $__SYSCALL_th_exit, %rax
+ int $33
\ No newline at end of file