From b4c14593185585772b080582ddc5ef4dc43ca07d Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Thu, 30 Sep 2004 23:30:29 +0000 Subject: [PATCH] Make use of the newly introduced generated syscall numbers header. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9135 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kernel/core/arch/x86/Jamfile | 37 +++++++++++++--------- src/kernel/core/arch/x86/arch_interrupts.S | 4 ++- src/kernel/core/arch/x86/arch_x86.S | 4 ++- 3 files changed, 28 insertions(+), 17 deletions(-) diff --git a/src/kernel/core/arch/x86/Jamfile b/src/kernel/core/arch/x86/Jamfile index b38e231b05..d5288c7b5e 100644 --- a/src/kernel/core/arch/x86/Jamfile +++ b/src/kernel/core/arch/x86/Jamfile @@ -1,21 +1,28 @@ SubDir OBOS_TOP src kernel core arch x86 ; +# for syscall_numbers.h +SubDirHdrs [ FObjectsDir src kernel core ] ; + KernelStaticLibrary libx86 : - <$(SOURCE_GRIST)>arch_cpu.c - <$(SOURCE_GRIST)>arch_dbg_console.c - <$(SOURCE_GRIST)>arch_debug.c - <$(SOURCE_GRIST)>arch_elf.c - <$(SOURCE_GRIST)>arch_faults.c - <$(SOURCE_GRIST)>arch_int.c -# <$(SOURCE_GRIST)>arch_selector.c - <$(SOURCE_GRIST)>arch_real_time_clock.c - <$(SOURCE_GRIST)>arch_smp.c - <$(SOURCE_GRIST)>arch_thread.c - <$(SOURCE_GRIST)>arch_timer.c - <$(SOURCE_GRIST)>arch_vm.c - <$(SOURCE_GRIST)>arch_vm_translation_map.c - <$(SOURCE_GRIST)>arch_x86.S - <$(SOURCE_GRIST)>arch_interrupts.S + arch_cpu.c + arch_dbg_console.c + arch_debug.c + arch_elf.c + arch_faults.c + arch_int.c +# arch_selector.c + arch_real_time_clock.c + arch_smp.c + arch_thread.c + arch_timer.c + arch_vm.c + arch_vm_translation_map.c + arch_x86.S + arch_interrupts.S : -fno-pic -Wno-unused ; + +# We need to specify the dependency on the generated syscalls file explicitly. +Includes [ FGristFiles arch_x86.S arch_interrupts.S ] + : syscall_numbers.h ; diff --git a/src/kernel/core/arch/x86/arch_interrupts.S b/src/kernel/core/arch/x86/arch_interrupts.S index 010195df09..343f6b79cc 100755 --- a/src/kernel/core/arch/x86/arch_interrupts.S +++ b/src/kernel/core/arch/x86/arch_interrupts.S @@ -6,6 +6,8 @@ #include +#include "syscall_numbers.h" + #define FUNCTION(x) .global x; .type x,@function; x .text @@ -160,7 +162,7 @@ FUNCTION(i386_stack_switch): FUNCTION(i386_return_from_signal): addl $12, %esp // Flushes the 3 arguments to sa_handler - movl $103, %eax // This syscall will restore the cpu context to the + movl $SYSCALL_RESTORE_SIGNAL_FRAME, %eax // This syscall will restore the cpu context to the movl $0, %ecx // one existing before calling the signal handler lea 4(%esp), %edx int $99 diff --git a/src/kernel/core/arch/x86/arch_x86.S b/src/kernel/core/arch/x86/arch_x86.S index 05e2e72d29..64ae9715f3 100755 --- a/src/kernel/core/arch/x86/arch_x86.S +++ b/src/kernel/core/arch/x86/arch_x86.S @@ -6,6 +6,8 @@ #include +#include "syscall_numbers.h" + #define FUNCTION(x) .global x; .type x,@function; x .text @@ -86,7 +88,7 @@ i386_uspace_exit_stub: pushl %eax movl $1, %ecx lea (%esp), %edx - movl $25, %eax; + movl $SYSCALL_EXIT_THREAD, %eax; int $99 .align 4 i386_uspace_exit_stub_end: