dtrace expects a globally accessible syscall symbol.

This commit is contained in:
christos 2014-10-26 15:38:28 +00:00
parent 628d3e8026
commit 8933a7a2ee

View File

@ -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 @@ __KERNEL_RCSID(0, "$NetBSD: syscall.c,v 1.12 2013/06/26 17:18:52 matt Exp $");
#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 @@ cpu_spawn_return(struct lwp *l)
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 @@ syscall(struct trapframe *frame)
userret(l);
}
void
syscall_intern(struct proc *p)
{
p->p_md.md_syscall = syscall;
}
#ifdef VM86
void