--- Gnu-Mach/kern/xpr.c 2020/09/02 04:42:40 1.1.1.2 +++ Gnu-Mach/kern/xpr.c 2020/09/02 04:47:24 1.1.1.4 @@ -24,10 +24,12 @@ * 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;