diff --git a/sys/arch/amiga/amiga/sys_machdep.c b/sys/arch/amiga/amiga/sys_machdep.c index b5d948ed5f10..0f553896090a 100644 --- a/sys/arch/amiga/amiga/sys_machdep.c +++ b/sys/arch/amiga/amiga/sys_machdep.c @@ -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 #include #include -#include #include #include @@ -54,63 +53,6 @@ #include #include -#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 diff --git a/sys/arch/atari/atari/sys_machdep.c b/sys/arch/atari/atari/sys_machdep.c index e0918026307e..4b10008252e2 100644 --- a/sys/arch/atari/atari/sys_machdep.c +++ b/sys/arch/atari/atari/sys_machdep.c @@ -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 #include #include -#include #include #include @@ -54,63 +53,6 @@ #include #include -#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 /* XXX should be in an include file somewhere */ diff --git a/sys/arch/hp300/hp300/sys_machdep.c b/sys/arch/hp300/hp300/sys_machdep.c index 097e4d89ee78..c73a40b0e445 100644 --- a/sys/arch/hp300/hp300/sys_machdep.c +++ b/sys/arch/hp300/hp300/sys_machdep.c @@ -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 #include #include -#include #include #include #include -#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 /* XXX should be in an include file somewhere */ diff --git a/sys/arch/luna68k/luna68k/sys_machdep.c b/sys/arch/luna68k/luna68k/sys_machdep.c index eaa6e677a39d..90bf89e21b89 100644 --- a/sys/arch/luna68k/luna68k/sys_machdep.c +++ b/sys/arch/luna68k/luna68k/sys_machdep.c @@ -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 /* 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 #include #include -#include #include #include @@ -61,64 +60,6 @@ __KERNEL_RCSID(0, "$NetBSD: sys_machdep.c,v 1.3 2000/06/29 08:17:26 mrg Exp $"); #include #include -#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 /* XXX should be in an include file somewhere */ diff --git a/sys/arch/mac68k/mac68k/sys_machdep.c b/sys/arch/mac68k/mac68k/sys_machdep.c index b401ce7d6759..4910fae374f2 100644 --- a/sys/arch/mac68k/mac68k/sys_machdep.c +++ b/sys/arch/mac68k/mac68k/sys_machdep.c @@ -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 #include #include -#include #include #include #include -#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 /* XXX should be in an include file somewhere */ diff --git a/sys/arch/mips/mips/sys_machdep.c b/sys/arch/mips/mips/sys_machdep.c index d1a9b5c2d005..73807d1efde1 100644 --- a/sys/arch/mips/mips/sys_machdep.c +++ b/sys/arch/mips/mips/sys_machdep.c @@ -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 #include #include -#include #include #include @@ -57,65 +56,6 @@ #include -#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; diff --git a/sys/arch/mvme68k/mvme68k/sys_machdep.c b/sys/arch/mvme68k/mvme68k/sys_machdep.c index 3daacfba3d65..cca3453b2ae2 100644 --- a/sys/arch/mvme68k/mvme68k/sys_machdep.c +++ b/sys/arch/mvme68k/mvme68k/sys_machdep.c @@ -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 #include #include -#include #include #include @@ -56,64 +55,6 @@ #include #include -#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 diff --git a/sys/arch/news68k/news68k/sys_machdep.c b/sys/arch/news68k/news68k/sys_machdep.c index 60d50ae01aa3..ddefba2057fc 100644 --- a/sys/arch/news68k/news68k/sys_machdep.c +++ b/sys/arch/news68k/news68k/sys_machdep.c @@ -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 #include #include -#include #include #include #include -#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 /* XXX should be in an include file somewhere */ diff --git a/sys/arch/next68k/next68k/sys_machdep.c b/sys/arch/next68k/next68k/sys_machdep.c index d05e9199adf2..98e364e352aa 100644 --- a/sys/arch/next68k/next68k/sys_machdep.c +++ b/sys/arch/next68k/next68k/sys_machdep.c @@ -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 #include #include -#include #include #include @@ -63,64 +62,6 @@ #include #include -#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 diff --git a/sys/arch/pc532/pc532/sys_machdep.c b/sys/arch/pc532/pc532/sys_machdep.c index 1832d37a6533..969cded47bab 100644 --- a/sys/arch/pc532/pc532/sys_machdep.c +++ b/sys/arch/pc532/pc532/sys_machdep.c @@ -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 #include #include -#include #include #include -#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; diff --git a/sys/arch/sparc/sparc/sys_machdep.c b/sys/arch/sparc/sparc/sys_machdep.c index 6d6e657ded0c..a8fec5040d2c 100644 --- a/sys/arch/sparc/sparc/sys_machdep.c +++ b/sys/arch/sparc/sparc/sys_machdep.c @@ -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 #include #include -#include #include #include -#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; diff --git a/sys/arch/sparc64/sparc64/sys_machdep.c b/sys/arch/sparc64/sparc64/sys_machdep.c index 13196b91a5cd..9ac51936fcc3 100644 --- a/sys/arch/sparc64/sparc64/sys_machdep.c +++ b/sys/arch/sparc64/sparc64/sys_machdep.c @@ -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 #include #include -#include #include #include -#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; diff --git a/sys/arch/sun3/sun3/sys_machdep.c b/sys/arch/sun3/sun3/sys_machdep.c index 811d3d53e3c2..91dc20dc8e20 100644 --- a/sys/arch/sun3/sun3/sys_machdep.c +++ b/sys/arch/sun3/sun3/sys_machdep.c @@ -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 #include #include -#include #include #include @@ -53,65 +52,6 @@ #include #include -#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 diff --git a/sys/arch/x68k/x68k/sys_machdep.c b/sys/arch/x68k/x68k/sys_machdep.c index 1c69cfb9b168..07fa44b03903 100644 --- a/sys/arch/x68k/x68k/sys_machdep.c +++ b/sys/arch/x68k/x68k/sys_machdep.c @@ -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 #include #include -#include #include #include /* XXX needed? */ #include -#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 /* XXX should be in an include file somewhere */