Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/x86/x86 dtrace expects a globally accessible syscal...



details:   https://anonhg.NetBSD.org/src/rev/725494f79ad5
branches:  trunk
changeset: 803412:725494f79ad5
user:      christos <christos%NetBSD.org@localhost>
date:      Sun Oct 26 15:38:28 2014 +0000

description:
dtrace expects a globally accessible syscall symbol.

diffstat:

 sys/arch/x86/x86/syscall.c |  27 +++++++++++++++++----------
 1 files changed, 17 insertions(+), 10 deletions(-)

diffs (67 lines):

diff -r 4a6ea45fea03 -r 725494f79ad5 sys/arch/x86/x86/syscall.c
--- a/sys/arch/x86/x86/syscall.c        Sun Oct 26 15:07:33 2014 +0000
+++ b/sys/arch/x86/x86/syscall.c        Sun Oct 26 15:38:28 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: syscall.c,v 1.12 2013/06/26 17:18:52 matt Exp $        */
+/*     $NetBSD: syscall.c,v 1.13 2014/10/26 15:38:28 christos Exp $    */
 
 /*-
  * Copyright (c) 1998, 2000, 2009 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: syscall.c,v 1.12 2013/06/26 17:18:52 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: syscall.c,v 1.13 2014/10/26 15:38:28 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -47,6 +47,8 @@
 #include <machine/psl.h>
 #include <machine/userret.h>
 
+#include "opt_dtrace.h"
+
 #ifndef __x86_64__
 #include "opt_vm86.h"
 #ifdef VM86
@@ -93,19 +95,17 @@
        userret(l);
 }
        
-void
-syscall_intern(struct proc *p)
-{
-
-       p->p_md.md_syscall = syscall;
-}
-
 /*
  * syscall(frame):
  *     System call request from POSIX system call gate interface to kernel.
  *     Like trap(), argument is call by reference.
  */
-static void
+#ifdef KDTRACE_HOOKS
+void syscall(struct trapframe *);
+#else
+static
+#endif
+void
 syscall(struct trapframe *frame)
 {
        const struct sysent *callp;
@@ -184,6 +184,13 @@
        userret(l);
 }
 
+void
+syscall_intern(struct proc *p)
+{
+
+       p->p_md.md_syscall = syscall;
+}
+
 #ifdef VM86
 
 void



Home | Main Index | Thread Index | Old Index