refactor: full rewrite of signal feature
[lunaix-os.git] / lunaix-os / kernel / asm / x86 / syscall.S
index bde7f36d9d79b6a0f2e59736be6fd5e4ad191fdc..ac3fe80d4a75afb9a7d93e643324309f62345d58 100644 (file)
@@ -20,7 +20,7 @@
         .long __lxsys_waitpid       /* 10 */
         .long __lxsys_sigreturn
         .long __lxsys_sigprocmask
-        .long __lxsys_signal
+        .long __lxsys_sys_sigaction
         .long __lxsys_pause
         .long __lxsys_kill          /* 15 */
         .long __lxsys_alarm
 .section .text
     syscall_hndlr:
         pushl %ebp
-        movl 8(%esp), %ebp
+        movl 8(%esp), %ebp          // isr_param*
 
-        movl  (%ebp), %eax          /* eax: call code as well as the return value from syscall */
-        cmpl  $__SYSCALL_MAX, %eax
+        addl $4, %ebp
+        movl (%ebp), %eax          /* eax: call code as well as the return value from syscall */
+        cmpl $__SYSCALL_MAX, %eax
         jae 2f
 
         shll $2, %eax
@@ -93,7 +94,7 @@
         pushl 8(%ebp)       /* ecx - #2 arg */
         pushl 4(%ebp)       /* ebx - #1 arg */
         
-        call (%eax)
+        call *(%eax)
 
         movl %eax, (%ebp)    /* save the return value */