Framework for exporting system header to user space (#59)
[lunaix-os.git] / lunaix-os / usr / libc / arch / i386 / trampoline.S
index 9261e4bebaf14b2b423cbcfaf611d162575b9b38..378dce4b561f6336a53ee0178e29c9377d82892c 100644 (file)
 
         addl $12, %esp
         
-        movl $__SYSCALL_sigreturn, %eax
+        movl $__NR__lxsys_sigreturn, %eax
         popl %ebx
+        int $33
+
+    .global th_trampoline
+    th_trampoline:
+        movl (%esp), %eax
+        movl 4(%esp), %ebx
+        pushl %ebx
+
+        calll *%eax
+
+        movl %eax, %ebx
+        movl $__NR__lxsys_th_exit, %eax
         int $33
\ No newline at end of file