diff --git a/sys/arch/usermode/modules/syscallemu/Makefile b/sys/arch/usermode/modules/syscallemu/Makefile index 78773ed801da..4fc0bb9414e1 100644 --- a/sys/arch/usermode/modules/syscallemu/Makefile +++ b/sys/arch/usermode/modules/syscallemu/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 2012/01/05 13:26:51 jmcneill Exp $ +# $NetBSD: Makefile,v 1.2 2012/01/06 13:16:20 jmcneill Exp $ NETBSDSRCDIR?= ../../../../.. @@ -11,6 +11,10 @@ M?= ${S}/modules KMOD= syscallemu SRCS= syscallemu.c -SRCS+= syscallemu_${MACHINE_ARCH}.c +.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64" +SRCS+= syscallemu_x86.c +.else +.error ${MACHINE_ARCH} not implemented +.endif .include diff --git a/sys/arch/usermode/modules/syscallemu/syscallemu_i386.c b/sys/arch/usermode/modules/syscallemu/syscallemu_x86.c similarity index 92% rename from sys/arch/usermode/modules/syscallemu/syscallemu_i386.c rename to sys/arch/usermode/modules/syscallemu/syscallemu_x86.c index 3dd7bae740e1..e73a44633461 100644 --- a/sys/arch/usermode/modules/syscallemu/syscallemu_i386.c +++ b/sys/arch/usermode/modules/syscallemu/syscallemu_x86.c @@ -1,4 +1,4 @@ -/* $NetBSD: syscallemu_i386.c,v 1.1 2012/01/05 13:26:51 jmcneill Exp $ */ +/* $NetBSD: syscallemu_x86.c,v 1.1 2012/01/06 13:16:20 jmcneill Exp $ */ /*- * Copyright (c) 2011 Reinoud Zandijk @@ -28,7 +28,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: syscallemu_i386.c,v 1.1 2012/01/05 13:26:51 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: syscallemu_x86.c,v 1.1 2012/01/06 13:16:20 jmcneill Exp $"); #include #include @@ -45,7 +45,7 @@ __KERNEL_RCSID(0, "$NetBSD: syscallemu_i386.c,v 1.1 2012/01/05 13:26:51 jmcneill * to the original syscall handler. */ static void -i386_syscall_emu(struct trapframe *frame) +x86_syscall_emu(struct trapframe *frame) { void (*md_syscall)(struct trapframe *) = NULL; struct syscallemu_data *sce; @@ -101,7 +101,7 @@ md_syscallemu(struct proc *p) void *osyscall; osyscall = p->p_md.md_syscall; - p->p_md.md_syscall = i386_syscall_emu; + p->p_md.md_syscall = x86_syscall_emu; return osyscall; }