g/c obsolete vtrace(2) stuff

This commit is contained in:
jdolecek 2000-12-13 18:13:05 +00:00
parent 03354da279
commit ca57e681bd
14 changed files with 15 additions and 838 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: sys_machdep.c,v 1.28 2000/06/29 08:44:03 mrg Exp $ */
/* $NetBSD: sys_machdep.c,v 1.29 2000/12/13 18:13:05 jdolecek Exp $ */
/*
* Copyright (c) 1982, 1986 Regents of the University of California.
@ -44,7 +44,6 @@
#include <sys/uio.h>
#include <sys/kernel.h>
#include <sys/buf.h>
#include <sys/trace.h>
#include <sys/mount.h>
#include <sys/syscallargs.h>
@ -54,63 +53,6 @@
#include <machine/cpu.h>
#include <m68k/cacheops.h>
#ifdef TRACE
int nvualarm;
sys_vtrace(p, v, retval)
struct proc *p;
void *v;
register_t *retval;
{
register struct sys_vtrace_args /* {
syscallarg(int) request;
syscallarg(int) value;
} */ *uap = v;
int vdoualarm();
switch (SCARG(uap, request)) {
case VTR_DISABLE: /* disable a trace point */
case VTR_ENABLE: /* enable a trace point */
if (SCARG(uap, value) < 0 || SCARG(uap, value) >= TR_NFLAGS)
return (EINVAL);
*retval = traceflags[SCARG(uap, value)];
traceflags[SCARG(uap, value)] = SCARG(uap, request);
break;
case VTR_VALUE: /* return a trace point setting */
if (SCARG(uap, value) < 0 || SCARG(uap, value) >= TR_NFLAGS)
return (EINVAL);
*retval = traceflags[SCARG(uap, value)];
break;
case VTR_UALARM: /* set a real-time ualarm, less than 1 min */
if (SCARG(uap, value) <= 0 || SCARG(uap, value) > 60 * hz ||
nvualarm > 5)
return (EINVAL);
nvualarm++;
timeout(vdoualarm, (caddr_t)p->p_pid, SCARG(uap, value));
break;
case VTR_STAMP:
trace(TR_STAMP, SCARG(uap, value), p->p_pid);
break;
}
return (0);
}
vdoualarm(arg)
int arg;
{
register struct proc *p;
p = pfind(arg);
if (p)
psignal(p, 16);
nvualarm--;
}
#endif
/* XXX should be in an include file somewhere */
#define CC_PURGE 1
#define CC_FLUSH 2

View File

@ -1,4 +1,4 @@
/* $NetBSD: sys_machdep.c,v 1.23 2000/06/29 08:28:23 mrg Exp $ */
/* $NetBSD: sys_machdep.c,v 1.24 2000/12/13 18:13:06 jdolecek Exp $ */
/*
* Copyright (c) 1982, 1986 Regents of the University of California.
@ -44,7 +44,6 @@
#include <sys/uio.h>
#include <sys/kernel.h>
#include <sys/buf.h>
#include <sys/trace.h>
#include <sys/mount.h>
#include <sys/syscallargs.h>
@ -54,63 +53,6 @@
#include <m68k/cpu.h>
#include <m68k/cacheops.h>
#ifdef TRACE
int nvualarm;
sys_vtrace(p, v, retval)
struct proc *p;
void *v;
register_t *retval;
{
register struct sys_vtrace_args /* {
syscallarg(int) request;
syscallarg(int) value;
} */ *uap = v;
int vdoualarm();
switch(SCARG(uap, request)) {
case VTR_DISABLE: /* disable a trace point */
case VTR_ENABLE: /* enable a trace point */
if(SCARG(uap, value) < 0 || SCARG(uap,value) >= TR_NFLAGS)
return (EINVAL);
*retval = traceflags[SCARG(uap,value)];
traceflags[SCARG(uap, value)] = SCARG(uap, request);
break;
case VTR_VALUE: /* return a trace point setting */
if(SCARG(uap, value) < 0 || SCARG(uap, value) >= TR_NFLAGS)
return (EINVAL);
*retval = traceflags[SCARG(uap, value)];
break;
case VTR_UALARM: /* set a real-time ualarm, less than 1 min */
if(SCARG(uap, value) <= 0 || SCARG(uap, value) > 60 * hz
|| nvualarm > 5)
return (EINVAL);
nvualarm++;
timeout(vdoualarm, (caddr_t)p->p_pid, SCARG(uap, value));
break;
case VTR_STAMP:
trace(TR_STAMP, SCARG(uap, value), p->p_pid);
break;
}
return (0);
}
vdoualarm(arg)
int arg;
{
register struct proc *p;
p = pfind(arg);
if (p)
psignal(p, 16);
nvualarm--;
}
#endif
#include <machine/cpu.h>
/* XXX should be in an include file somewhere */

View File

@ -1,4 +1,4 @@
/* $NetBSD: sys_machdep.c,v 1.29 2000/06/29 08:23:03 mrg Exp $ */
/* $NetBSD: sys_machdep.c,v 1.30 2000/12/13 18:13:07 jdolecek Exp $ */
/*
* Copyright (c) 1982, 1986, 1993
@ -48,71 +48,12 @@
#include <sys/uio.h>
#include <sys/kernel.h>
#include <sys/buf.h>
#include <sys/trace.h>
#include <sys/mount.h>
#include <uvm/uvm_extern.h>
#include <sys/syscallargs.h>
#ifdef TRACE
int nvualarm;
sys_vtrace(p, v, retval)
struct proc *p;
void *v;
register_t *retval;
{
struct sys_vtrace_args /* {
syscallarg(int) request;
syscallarg(int) value;
} */ *uap = v;
int vdoualarm();
switch (SCARG(uap, request)) {
case VTR_DISABLE: /* disable a trace point */
case VTR_ENABLE: /* enable a trace point */
if (SCARG(uap, value) < 0 || SCARG(uap, value) >= TR_NFLAGS)
return (EINVAL);
*retval = traceflags[SCARG(uap, value)];
traceflags[SCARG(uap, value)] = SCARG(uap, request);
break;
case VTR_VALUE: /* return a trace point setting */
if (SCARG(uap, value) < 0 || SCARG(uap, value) >= TR_NFLAGS)
return (EINVAL);
*retval = traceflags[SCARG(uap, value)];
break;
case VTR_UALARM: /* set a real-time ualarm, less than 1 min */
if (SCARG(uap, value) <= 0 || SCARG(uap, value) > 60 * hz ||
nvualarm > 5)
return (EINVAL);
nvualarm++;
timeout(vdoualarm, (void *)p->p_pid, SCARG(uap, value));
break;
case VTR_STAMP:
trace(TR_STAMP, SCARG(uap, value), p->p_pid);
break;
}
return (0);
}
vdoualarm(arg)
void *arg;
{
int pid = (int)arg;
struct proc *p;
p = pfind(pid);
if (p)
psignal(p, 16);
nvualarm--;
}
#endif
#include <machine/cpu.h>
/* XXX should be in an include file somewhere */

View File

@ -1,4 +1,4 @@
/* $NetBSD: sys_machdep.c,v 1.3 2000/06/29 08:17:26 mrg Exp $ */
/* $NetBSD: sys_machdep.c,v 1.4 2000/12/13 18:13:07 jdolecek Exp $ */
/*
* Copyright (c) 1982, 1986, 1993
@ -37,7 +37,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: sys_machdep.c,v 1.3 2000/06/29 08:17:26 mrg Exp $");
__KERNEL_RCSID(0, "$NetBSD: sys_machdep.c,v 1.4 2000/12/13 18:13:07 jdolecek Exp $");
#include "opt_compat_hpux.h"
@ -50,7 +50,6 @@ __KERNEL_RCSID(0, "$NetBSD: sys_machdep.c,v 1.3 2000/06/29 08:17:26 mrg Exp $");
#include <sys/uio.h>
#include <sys/kernel.h>
#include <sys/buf.h>
#include <sys/trace.h>
#include <sys/mount.h>
#include <uvm/uvm_extern.h>
@ -61,64 +60,6 @@ __KERNEL_RCSID(0, "$NetBSD: sys_machdep.c,v 1.3 2000/06/29 08:17:26 mrg Exp $");
#include <m68k/cacheops_30.h>
#include <m68k/cacheops_40.h>
#ifdef TRACE
int nvualarm;
sys_vtrace(p, v, retval)
struct proc *p;
void *v;
register_t *retval;
{
struct sys_vtrace_args /* {
syscallarg(int) request;
syscallarg(int) value;
} */ *uap = v;
int vdoualarm();
switch (SCARG(uap, request)) {
case VTR_DISABLE: /* disable a trace point */
case VTR_ENABLE: /* enable a trace point */
if (SCARG(uap, value) < 0 || SCARG(uap, value) >= TR_NFLAGS)
return (EINVAL);
*retval = traceflags[SCARG(uap, value)];
traceflags[SCARG(uap, value)] = SCARG(uap, request);
break;
case VTR_VALUE: /* return a trace point setting */
if (SCARG(uap, value) < 0 || SCARG(uap, value) >= TR_NFLAGS)
return (EINVAL);
*retval = traceflags[SCARG(uap, value)];
break;
case VTR_UALARM: /* set a real-time ualarm, less than 1 min */
if (SCARG(uap, value) <= 0 || SCARG(uap, value) > 60 * hz ||
nvualarm > 5)
return (EINVAL);
nvualarm++;
timeout(vdoualarm, (void *)p->p_pid, SCARG(uap, value));
break;
case VTR_STAMP:
trace(TR_STAMP, SCARG(uap, value), p->p_pid);
break;
}
return (0);
}
vdoualarm(arg)
void *arg;
{
int pid = (int)arg;
struct proc *p;
p = pfind(pid);
if (p)
psignal(p, 16);
nvualarm--;
}
#endif
#include <machine/cpu.h>
/* XXX should be in an include file somewhere */

View File

@ -1,4 +1,4 @@
/* $NetBSD: sys_machdep.c,v 1.17 2000/06/29 08:15:13 mrg Exp $ */
/* $NetBSD: sys_machdep.c,v 1.18 2000/12/13 18:13:08 jdolecek Exp $ */
/*
* Copyright (c) 1990 The Regents of the University of California.
@ -78,71 +78,12 @@
#include <sys/uio.h>
#include <sys/kernel.h>
#include <sys/buf.h>
#include <sys/trace.h>
#include <sys/mount.h>
#include <uvm/uvm_extern.h>
#include <sys/syscallargs.h>
#ifdef TRACE
int nvualarm;
sys_vtrace(p, v, retval)
struct proc *p;
void *v;
register_t *retval;
{
struct sys_vtrace_args /* {
syscallarg(int) request;
syscallarg(int) value;
} */ *uap = v;
int vdoualarm();
switch (SCARG(uap, request)) {
case VTR_DISABLE: /* disable a trace point */
case VTR_ENABLE: /* enable a trace point */
if (SCARG(uap, value) < 0 || SCARG(uap, value) >= TR_NFLAGS)
return (EINVAL);
*retval = traceflags[SCARG(uap, value)];
traceflags[SCARG(uap, value)] = SCARG(uap, request);
break;
case VTR_VALUE: /* return a trace point setting */
if (SCARG(uap, value) < 0 || SCARG(uap, value) >= TR_NFLAGS)
return (EINVAL);
*retval = traceflags[SCARG(uap, value)];
break;
case VTR_UALARM: /* set a real-time ualarm, less than 1 min */
if (SCARG(uap, value) <= 0 || SCARG(uap, value) > 60 * hz ||
nvualarm > 5)
return (EINVAL);
nvualarm++;
timeout(vdoualarm, (void *)p->p_pid, SCARG(uap, value));
break;
case VTR_STAMP:
trace(TR_STAMP, SCARG(uap, value), p->p_pid);
break;
}
return (0);
}
vdoualarm(arg)
void *arg;
{
int pid = (int)arg;
struct proc *p;
p = pfind(pid);
if (p)
psignal(p, 16);
nvualarm--;
}
#endif
#include <machine/cpu.h>
/* XXX should be in an include file somewhere */

View File

@ -1,4 +1,4 @@
/* $NetBSD: sys_machdep.c,v 1.18 2000/06/29 08:11:27 mrg Exp $ */
/* $NetBSD: sys_machdep.c,v 1.19 2000/12/13 18:13:08 jdolecek Exp $ */
/*
* Copyright (c) 1992, 1993
@ -47,7 +47,6 @@
#include <sys/uio.h>
#include <sys/kernel.h>
#include <sys/buf.h>
#include <sys/trace.h>
#include <sys/mount.h>
#include <sys/syscallargs.h>
@ -57,65 +56,6 @@
#include <uvm/uvm_extern.h>
#ifdef TRACE
int nvualarm;
int
vtrace(p, v, retval)
struct proc *p;
void *v;
register_t *retval;
{
struct vtrace_args /* {
syscallarg(int) request;
syscallarg(int) value;
} */ *uap = v;
int vdoualarm();
switch (SCARG(uap, request)) {
case VTR_DISABLE: /* disable a trace point */
case VTR_ENABLE: /* enable a trace point */
if (SCARG(uap, value) < 0 || SCARG(uap, value) >= TR_NFLAGS)
return (EINVAL);
*retval = traceflags[SCARG(uap, value)];
traceflags[SCARG(uap, value)] = SCARG(uap, request);
break;
case VTR_VALUE: /* return a trace point setting */
if (SCARG(uap, value) < 0 || SCARG(uap, value) >= TR_NFLAGS)
return (EINVAL);
*retval = traceflags[SCARG(uap, value)];
break;
case VTR_UALARM: /* set a real-time ualarm, less than 1 min */
if (SCARG(uap, value) <= 0 || SCARG(uap, value) > 60 * hz ||
nvualarm > 5)
return (EINVAL);
nvualarm++;
timeout(vdoualarm, (caddr_t)p->p_pid, SCARG(uap, value));
break;
case VTR_STAMP:
trace(TR_STAMP, SCARG(uap, value), p->p_pid);
break;
}
return (0);
}
void
vdoualarm(arg)
int arg;
{
struct proc *p;
p = pfind(arg);
if (p)
psignal(p, 16);
nvualarm--;
}
#endif /* TRACE */
int
sys_sysarch(p, v, retval)
struct proc *p;

View File

@ -1,4 +1,4 @@
/* $NetBSD: sys_machdep.c,v 1.22 2000/11/20 19:35:30 scw Exp $ */
/* $NetBSD: sys_machdep.c,v 1.23 2000/12/13 18:13:08 jdolecek Exp $ */
/*
* Copyright (c) 1982, 1986, 1993
@ -46,7 +46,6 @@
#include <sys/uio.h>
#include <sys/kernel.h>
#include <sys/buf.h>
#include <sys/trace.h>
#include <sys/mount.h>
#include <uvm/uvm_extern.h>
@ -56,64 +55,6 @@
#include <machine/cpu.h>
#include <m68k/cacheops.h>
#ifdef TRACE
int nvualarm;
vtrace(p, v, retval)
struct proc *p;
void *v;
int *retval;
{
struct vtrace_args /* {
syscallarg(int) request;
syscallarg(int) value;
} */ *uap = v;
int vdoualarm();
switch (SCARG(uap, request)) {
case VTR_DISABLE: /* disable a trace point */
case VTR_ENABLE: /* enable a trace point */
if (SCARG(uap, value) < 0 || SCARG(uap, value) >= TR_NFLAGS)
return (EINVAL);
*retval = traceflags[SCARG(uap, value)];
traceflags[SCARG(uap, value)] = SCARG(uap, request);
break;
case VTR_VALUE: /* return a trace point setting */
if (SCARG(uap, value) < 0 || SCARG(uap, value) >= TR_NFLAGS)
return (EINVAL);
*retval = traceflags[SCARG(uap, value)];
break;
case VTR_UALARM: /* set a real-time ualarm, less than 1 min */
if (SCARG(uap, value) <= 0 || SCARG(uap, value) > 60 * hz ||
nvualarm > 5)
return (EINVAL);
nvualarm++;
timeout(vdoualarm, (void *)p->p_pid, SCARG(uap, value));
break;
case VTR_STAMP:
trace(TR_STAMP, SCARG(uap, value), p->p_pid);
break;
}
return (0);
}
vdoualarm(arg)
void *arg;
{
int pid = (int)arg;
struct proc *p;
p = pfind(pid);
if (p)
psignal(p, 16);
nvualarm--;
}
#endif
/* XXX should be in an include file somewhere */
#define CC_PURGE 1
#define CC_FLUSH 2

View File

@ -1,4 +1,4 @@
/* $NetBSD: sys_machdep.c,v 1.2 2000/06/29 08:02:52 mrg Exp $ */
/* $NetBSD: sys_machdep.c,v 1.3 2000/12/13 18:13:09 jdolecek Exp $ */
/*
* Copyright (c) 1982, 1986, 1993
@ -41,71 +41,12 @@
#include <sys/systm.h>
#include <sys/time.h>
#include <sys/uio.h>
#include <sys/trace.h>
#include <sys/mount.h>
#include <uvm/uvm_extern.h>
#include <sys/syscallargs.h>
#ifdef TRACE
int nvualarm;
sys_vtrace(p, v, retval)
struct proc *p;
void *v;
register_t *retval;
{
struct sys_vtrace_args /* {
syscallarg(int) request;
syscallarg(int) value;
} */ *uap = v;
int vdoualarm();
switch (SCARG(uap, request)) {
case VTR_DISABLE: /* disable a trace point */
case VTR_ENABLE: /* enable a trace point */
if (SCARG(uap, value) < 0 || SCARG(uap, value) >= TR_NFLAGS)
return (EINVAL);
*retval = traceflags[SCARG(uap, value)];
traceflags[SCARG(uap, value)] = SCARG(uap, request);
break;
case VTR_VALUE: /* return a trace point setting */
if (SCARG(uap, value) < 0 || SCARG(uap, value) >= TR_NFLAGS)
return (EINVAL);
*retval = traceflags[SCARG(uap, value)];
break;
case VTR_UALARM: /* set a real-time ualarm, less than 1 min */
if (SCARG(uap, value) <= 0 || SCARG(uap, value) > 60 * hz ||
nvualarm > 5)
return (EINVAL);
nvualarm++;
timeout(vdoualarm, (void *)p->p_pid, SCARG(uap, value));
break;
case VTR_STAMP:
trace(TR_STAMP, SCARG(uap, value), p->p_pid);
break;
}
return (0);
}
vdoualarm(arg)
void *arg;
{
int pid = (int)arg;
struct proc *p;
p = pfind(pid);
if (p)
psignal(p, 16);
nvualarm--;
}
#endif
#include <machine/cpu.h>
/* XXX should be in an include file somewhere */

View File

@ -1,4 +1,4 @@
/* $NetBSD: sys_machdep.c,v 1.11 2000/06/29 07:58:50 mrg Exp $ */
/* $NetBSD: sys_machdep.c,v 1.12 2000/12/13 18:13:09 jdolecek Exp $ */
/*
* This file was taken from mvme68k/mvme68k/sys_machdep.c
@ -53,7 +53,6 @@
#include <sys/uio.h>
#include <sys/kernel.h>
#include <sys/buf.h>
#include <sys/trace.h>
#include <sys/mount.h>
#include <uvm/uvm_extern.h>
@ -63,64 +62,6 @@
#include <machine/cpu.h>
#include <m68k/cacheops.h>
#ifdef TRACE
int nvualarm;
vtrace(p, v, retval)
struct proc *p;
void *v;
int *retval;
{
struct vtrace_args /* {
syscallarg(int) request;
syscallarg(int) value;
} */ *uap = v;
int vdoualarm();
switch (SCARG(uap, request)) {
case VTR_DISABLE: /* disable a trace point */
case VTR_ENABLE: /* enable a trace point */
if (SCARG(uap, value) < 0 || SCARG(uap, value) >= TR_NFLAGS)
return (EINVAL);
*retval = traceflags[SCARG(uap, value)];
traceflags[SCARG(uap, value)] = SCARG(uap, request);
break;
case VTR_VALUE: /* return a trace point setting */
if (SCARG(uap, value) < 0 || SCARG(uap, value) >= TR_NFLAGS)
return (EINVAL);
*retval = traceflags[SCARG(uap, value)];
break;
case VTR_UALARM: /* set a real-time ualarm, less than 1 min */
if (SCARG(uap, value) <= 0 || SCARG(uap, value) > 60 * hz ||
nvualarm > 5)
return (EINVAL);
nvualarm++;
timeout(vdoualarm, (void *)p->p_pid, SCARG(uap, value));
break;
case VTR_STAMP:
trace(TR_STAMP, SCARG(uap, value), p->p_pid);
break;
}
return (0);
}
vdoualarm(arg)
void *arg;
{
int pid = (int)arg;
struct proc *p;
p = pfind(pid);
if (p)
psignal(p, 16);
nvualarm--;
}
#endif
/* XXX should be in an include file somewhere */
#define CC_PURGE 1
#define CC_FLUSH 2

View File

@ -1,4 +1,4 @@
/* $NetBSD: sys_machdep.c,v 1.9 1999/01/19 18:18:43 thorpej Exp $ */
/* $NetBSD: sys_machdep.c,v 1.10 2000/12/13 18:13:10 jdolecek Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@ -47,67 +47,9 @@
#include <sys/uio.h>
#include <sys/kernel.h>
#include <sys/buf.h>
#include <sys/trace.h>
#include <sys/mount.h>
#include <sys/syscallargs.h>
#ifdef TRACE
int nvualarm;
vtrace(p, v, retval)
struct proc *p;
void *v;
register_t *retval;
{
register struct vtrace_args /* {
syscallarg(int) request;
syscallarg(int) value;
} */ *uap = v;
int vdoualarm();
switch (SCARG(uap, request)) {
case VTR_DISABLE: /* disable a trace point */
case VTR_ENABLE: /* enable a trace point */
if (SCARG(uap, value) < 0 || SCARG(uap, value) >= TR_NFLAGS)
return (EINVAL);
*retval = traceflags[SCARG(uap, value)];
traceflags[SCARG(uap, value)] = SCARG(uap, request);
break;
case VTR_VALUE: /* return a trace point setting */
if (SCARG(uap, value) < 0 || SCARG(uap, value) >= TR_NFLAGS)
return (EINVAL);
*retval = traceflags[SCARG(uap, value)];
break;
case VTR_UALARM: /* set a real-time ualarm, less than 1 min */
if (SCARG(uap, value) <= 0 || SCARG(uap, value) > 60 * hz ||
nvualarm > 5)
return (EINVAL);
nvualarm++;
timeout(vdoualarm, (caddr_t)p->p_pid, SCARG(uap, value));
break;
case VTR_STAMP:
trace(TR_STAMP, SCARG(uap, value), p->p_pid);
break;
}
return (0);
}
vdoualarm(arg)
int arg;
{
register struct proc *p;
p = pfind(arg);
if (p)
psignal(p, 16);
nvualarm--;
}
#endif
int
sys_sysarch(p, v, retval)
struct proc *p;

View File

@ -1,4 +1,4 @@
/* $NetBSD: sys_machdep.c,v 1.9 1999/01/19 18:18:45 thorpej Exp $ */
/* $NetBSD: sys_machdep.c,v 1.10 2000/12/13 18:13:10 jdolecek Exp $ */
/*
* Copyright (c) 1992, 1993
@ -53,68 +53,10 @@
#include <sys/uio.h>
#include <sys/kernel.h>
#include <sys/buf.h>
#include <sys/trace.h>
#include <sys/mount.h>
#include <sys/syscallargs.h>
#ifdef TRACE
int nvualarm;
int
vtrace(p, uap, retval)
struct proc *p;
register struct vtrace_args /* {
syscallarg(int) request;
syscallarg(int) value;
} */ *uap;
register_t *retval;
{
int vdoualarm();
switch (SCARG(uap, request)) {
case VTR_DISABLE: /* disable a trace point */
case VTR_ENABLE: /* enable a trace point */
if (SCARG(uap, value) < 0 || SCARG(uap, value) >= TR_NFLAGS)
return (EINVAL);
*retval = traceflags[SCARG(uap, value)];
traceflags[SCARG(uap, value)] = SCARG(uap, request);
break;
case VTR_VALUE: /* return a trace point setting */
if (SCARG(uap, value) < 0 || SCARG(uap, value) >= TR_NFLAGS)
return (EINVAL);
*retval = traceflags[SCARG(uap, value)];
break;
case VTR_UALARM: /* set a real-time ualarm, less than 1 min */
if (SCARG(uap, value) <= 0 || SCARG(uap, value) > 60 * hz ||
nvualarm > 5)
return (EINVAL);
nvualarm++;
timeout(vdoualarm, (caddr_t)p->p_pid, SCARG(uap, value));
break;
case VTR_STAMP:
trace(TR_STAMP, SCARG(uap, value), p->p_pid);
break;
}
return (0);
}
void
vdoualarm(arg)
int arg;
{
register struct proc *p = pfind(arg);
if (p != NULL)
psignal(p, 16);
nvualarm--;
}
#endif
int
sys_sysarch(p, v, retval)
struct proc *p;

View File

@ -1,4 +1,4 @@
/* $NetBSD: sys_machdep.c,v 1.2 1999/01/19 18:18:45 thorpej Exp $ */
/* $NetBSD: sys_machdep.c,v 1.3 2000/12/13 18:13:11 jdolecek Exp $ */
/*
* Copyright (c) 1992, 1993
@ -53,68 +53,10 @@
#include <sys/uio.h>
#include <sys/kernel.h>
#include <sys/buf.h>
#include <sys/trace.h>
#include <sys/mount.h>
#include <sys/syscallargs.h>
#ifdef TRACE
int nvualarm;
int
vtrace(p, uap, retval)
struct proc *p;
register struct vtrace_args /* {
syscallarg(int) request;
syscallarg(int) value;
} */ *uap;
register_t *retval;
{
int vdoualarm();
switch (SCARG(uap, request)) {
case VTR_DISABLE: /* disable a trace point */
case VTR_ENABLE: /* enable a trace point */
if (SCARG(uap, value) < 0 || SCARG(uap, value) >= TR_NFLAGS)
return (EINVAL);
*retval = traceflags[SCARG(uap, value)];
traceflags[SCARG(uap, value)] = SCARG(uap, request);
break;
case VTR_VALUE: /* return a trace point setting */
if (SCARG(uap, value) < 0 || SCARG(uap, value) >= TR_NFLAGS)
return (EINVAL);
*retval = traceflags[SCARG(uap, value)];
break;
case VTR_UALARM: /* set a real-time ualarm, less than 1 min */
if (SCARG(uap, value) <= 0 || SCARG(uap, value) > 60 * hz ||
nvualarm > 5)
return (EINVAL);
nvualarm++;
timeout(vdoualarm, (caddr_t)p->p_pid, SCARG(uap, value));
break;
case VTR_STAMP:
trace(TR_STAMP, SCARG(uap, value), p->p_pid);
break;
}
return (0);
}
void
vdoualarm(arg)
int arg;
{
register struct proc *p = pfind(arg);
if (p != NULL)
psignal(p, 16);
nvualarm--;
}
#endif
int
sys_sysarch(p, v, retval)
struct proc *p;

View File

@ -1,4 +1,4 @@
/* $NetBSD: sys_machdep.c,v 1.12 2000/06/29 07:19:09 mrg Exp $ */
/* $NetBSD: sys_machdep.c,v 1.13 2000/12/13 18:13:11 jdolecek Exp $ */
/*
* Copyright (c) 1982, 1986, 1993
@ -44,7 +44,6 @@
#include <sys/uio.h>
#include <sys/kernel.h>
#include <sys/buf.h>
#include <sys/trace.h>
#include <sys/mount.h>
#include <sys/syscallargs.h>
@ -53,65 +52,6 @@
#include <machine/cpu.h>
#include <sun3/sun3/machdep.h>
#ifdef TRACE
int nvualarm;
sys_vtrace(p, v, retval)
struct proc *p;
void *v;
register_t *retval;
{
register struct sys_vtrace_args /* {
syscallarg(int) request;
syscallarg(int) value;
} */ *uap = v;
int vdoualarm();
switch (SCARG(uap, request)) {
case VTR_DISABLE: /* disable a trace point */
case VTR_ENABLE: /* enable a trace point */
if (SCARG(uap, value) < 0 || SCARG(uap, value) >= TR_NFLAGS)
return (EINVAL);
*retval = traceflags[SCARG(uap, value)];
traceflags[SCARG(uap, value)] = SCARG(uap, request);
break;
case VTR_VALUE: /* return a trace point setting */
if (SCARG(uap, value) < 0 || SCARG(uap, value) >= TR_NFLAGS)
return (EINVAL);
*retval = traceflags[SCARG(uap, value)];
break;
case VTR_UALARM: /* set a real-time ualarm, less than 1 min */
if (SCARG(uap, value) <= 0 || SCARG(uap, value) > 60 * hz ||
nvualarm > 5)
return (EINVAL);
nvualarm++;
timeout(vdoualarm, (void *)p->p_pid, SCARG(uap, value));
break;
case VTR_STAMP:
trace(TR_STAMP, SCARG(uap, value), p->p_pid);
break;
}
return (0);
}
vdoualarm(arg)
void *arg;
{
register int pid = (int)arg;
register struct proc *p;
p = pfind(pid);
if (p)
psignal(p, 16);
nvualarm--;
}
#endif
/* XXX should be in an include file somewhere */
#define CC_PURGE 1
#define CC_FLUSH 2

View File

@ -1,4 +1,4 @@
/* $NetBSD: sys_machdep.c,v 1.21 2000/06/29 07:07:56 mrg Exp $ */
/* $NetBSD: sys_machdep.c,v 1.22 2000/12/13 18:13:11 jdolecek Exp $ */
/*
* Copyright (c) 1982, 1986, 1993
@ -47,71 +47,12 @@
#include <sys/uio.h>
#include <sys/kernel.h>
#include <sys/buf.h>
#include <sys/trace.h>
#include <sys/mount.h>
#include <uvm/uvm_extern.h> /* XXX needed? */
#include <sys/syscallargs.h>
#ifdef TRACE
int nvualarm;
sys_vtrace(p, v, retval)
struct proc *p;
void *v;
register_t *retval;
{
struct sys_vtrace_args /* {
syscallarg(int) request;
syscallarg(int) value;
} */ *uap = v;
int vdoualarm();
switch (SCARG(uap, request)) {
case VTR_DISABLE: /* disable a trace point */
case VTR_ENABLE: /* enable a trace point */
if (SCARG(uap, value) < 0 || SCARG(uap, value) >= TR_NFLAGS)
return (EINVAL);
*retval = traceflags[SCARG(uap, value)];
traceflags[SCARG(uap, value)] = SCARG(uap, request);
break;
case VTR_VALUE: /* return a trace point setting */
if (SCARG(uap, value) < 0 || SCARG(uap, value) >= TR_NFLAGS)
return (EINVAL);
*retval = traceflags[SCARG(uap, value)];
break;
case VTR_UALARM: /* set a real-time ualarm, less than 1 min */
if (SCARG(uap, value) <= 0 || SCARG(uap, value) > 60 * hz ||
nvualarm > 5)
return (EINVAL);
nvualarm++;
timeout(vdoualarm, (void *)p->p_pid, SCARG(uap, value));
break;
case VTR_STAMP:
trace(TR_STAMP, SCARG(uap, value), p->p_pid);
break;
}
return (0);
}
vdoualarm(arg)
void *arg;
{
int pid = (int)arg;
struct proc *p;
p = pfind(pid);
if (p)
psignal(p, 16);
nvualarm--;
}
#endif
#include <machine/cpu.h>
/* XXX should be in an include file somewhere */