--- Gnu-Mach/kern/xpr.c 2020/09/02 04:36:56 1.1.1.1 +++ Gnu-Mach/kern/xpr.c 2020/09/02 04:47:24 1.1.1.4 @@ -1,33 +1,35 @@ -/* +/* * Mach Operating System * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University * All Rights Reserved. - * + * * Permission to use, copy, modify and distribute this software and its * documentation is hereby granted, provided that both the copyright * notice and this permission notice appear in all copies of the * software, derivative works or modified versions, and any portions * thereof, and that both notices appear in supporting documentation. - * + * * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * + * * Carnegie Mellon requests users of this software to return to - * + * * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU * School of Computer Science * Carnegie Mellon University * Pittsburgh PA 15213-3890 - * + * * any improvements or extensions that they make and grant Carnegie Mellon * the rights to redistribute these changes. */ -#include /* * xpr silent tracing circular buffer. */ +#include + +#include #include #include #include "cpu_number.h" @@ -54,12 +56,16 @@ struct xprbuf *xprptr; /* Currently allo struct xprbuf *xprlast; /* Pointer to end of circular buffer */ /*VARARGS1*/ -void xpr(msg, arg1, arg2, arg3, arg4, arg5) -char *msg; -int arg1, arg2, arg3, arg4, arg5; +void xpr( + char *msg, + int arg1, + int arg2, + int arg3, + int arg4, + int arg5) { - register spl_t s; - register struct xprbuf *x; + spl_t s; + struct xprbuf *x; /* If we aren't initialized, ignore trace request */ if (!xprenable || (xprptr == 0)) @@ -86,7 +92,7 @@ int arg1, arg2, arg3, arg4, arg5; x->cpuinfo = cpu_number(); } -void xprbootstrap() +void xprbootstrap(void) { vm_offset_t addr; vm_size_t size; @@ -113,7 +119,7 @@ void xprbootstrap() * the previous buffer contents. */ - bzero((char *) addr, size); + memset((void *) addr, 0, size); } xprbase = (struct xprbuf *) addr; @@ -123,16 +129,15 @@ void xprbootstrap() int xprinitial = 0; -void xprinit() +void xprinit(void) { xprflags |= xprinitial; } #if MACH_KDB #include +#include - -extern void db_printf(); extern jmp_buf_t *db_recover; /* @@ -143,16 +148,16 @@ extern jmp_buf_t *db_recover; * Called with arguments, it can dump xpr buffers in user tasks, * assuming they use the same format as the kernel. */ -void xpr_dump(base, nbufs) - struct xprbuf *base; - int nbufs; +void xpr_dump( + struct xprbuf *base, + int nbufs) { jmp_buf_t db_jmpbuf; jmp_buf_t *prev; struct xprbuf *last, *ptr; - register struct xprbuf *x; + struct xprbuf *x; int i; - spl_t s; + spl_t s = s; if (base == 0) { base = xprbase; @@ -189,4 +194,4 @@ void xpr_dump(base, nbufs) (void) splx(s); } } -#endif MACH_KDB +#endif /* MACH_KDB */