--- Gnu-Mach/kern/eventcount.c 2020/09/02 04:36:56 1.1 +++ Gnu-Mach/kern/eventcount.c 2020/09/02 04:45:13 1.1.1.2 @@ -35,11 +35,12 @@ * */ - -#include +#include +#include #include #include +#include #include "cpu_number.h" #include #include @@ -70,7 +71,7 @@ evc_init(evc_t ev) { int i; - bzero((char*)ev, sizeof(*ev)); + memset(ev, 0, sizeof(*ev)); /* keep track of who is who */ for (i = 0; i < MAX_EVCS; i++) @@ -125,7 +126,6 @@ void evc_notify_abort(thread_t thread) splx(s); } -#ifdef CONTINUATIONS /* * Just so that we return success, and give * up the stack while blocked @@ -136,9 +136,6 @@ evc_continue(void) thread_syscall_return(KERN_SUCCESS); /* NOTREACHED */ } -#else /* not CONTINUATIONS */ -#define evc_continue 0 -#endif /* not CONTINUATIONS */ /* * User-trappable @@ -193,7 +190,6 @@ kern_return_t evc_wait(natural_t ev_id) kern_return_t evc_wait_clear(natural_t ev_id) { spl_t s; - kern_return_t ret; evc_t ev; if ((ev_id >= MAX_EVCS) || @@ -230,7 +226,7 @@ kern_return_t evc_wait_clear(natural_t e simple_unlock(&ev->lock); splx(s); - ret = KERN_NO_SPACE; /* XX */ + return KERN_NO_SPACE; /* XX */ } /* @@ -330,7 +326,7 @@ simpler_thread_setrun( boolean_t may_preempt) { register struct run_queue *rq; - register whichq; + register int whichq; /* * XXX should replace queue with a boolean in this case.