Index: sys/dev/mlx/mlx.c =================================================================== RCS file: /home/ncvs/src/sys/dev/mlx/mlx.c,v retrieving revision 1.25 diff -u -r1.25 mlx.c --- sys/dev/mlx/mlx.c 2000/11/28 06:17:32 1.25 +++ sys/dev/mlx/mlx.c 2001/01/20 04:32:32 @@ -2215,7 +2215,7 @@ /* remove from list and wake up sleeper */ TAILQ_REMOVE(&sc->mlx_work, mc, mc_link); - wakeup_one(mc->mc_private); + (void)wakeup_one(mc->mc_private); /* * Leave the command for a caller that's polling for it. Index: sys/dev/twe/twe.c =================================================================== RCS file: /home/ncvs/src/sys/dev/twe/twe.c,v retrieving revision 1.6 diff -u -r1.6 twe.c --- sys/dev/twe/twe.c 2000/12/03 02:11:35 1.6 +++ sys/dev/twe/twe.c 2001/01/20 04:32:32 @@ -1102,7 +1102,7 @@ } else if (tr->tr_flags & TWE_CMD_SLEEPER) { /* caller is asleep waiting */ debug(2, "wake up command owner on %p", tr); - wakeup_one(tr); + (void)wakeup_one(tr); } else { /* caller is polling command */ debug(2, "command left for owner"); Index: sys/dev/vinum/vinumconfig.c =================================================================== RCS file: /home/ncvs/src/sys/dev/vinum/vinumconfig.c,v retrieving revision 1.37 diff -u -r1.37 vinumconfig.c --- sys/dev/vinum/vinumconfig.c 2001/01/14 06:29:56 1.37 +++ sys/dev/vinum/vinumconfig.c 2001/01/20 04:32:32 @@ -2057,7 +2057,7 @@ vinum_conf.flags &= ~VF_CONFIGURING; /* and now other people can take a turn */ if ((vinum_conf.flags & VF_WILL_CONFIGURE) != 0) { vinum_conf.flags &= ~VF_WILL_CONFIGURE; - wakeup_one(&vinum_conf); + (void)wakeup_one(&vinum_conf); } } /* Local Variables: */ Index: sys/dev/vinum/vinumlock.c =================================================================== RCS file: /home/ncvs/src/sys/dev/vinum/vinumlock.c,v retrieving revision 1.21 diff -u -r1.21 vinumlock.c --- sys/dev/vinum/vinumlock.c 2001/01/14 06:34:57 1.21 +++ sys/dev/vinum/vinumlock.c 2001/01/20 04:32:32 @@ -217,8 +217,8 @@ lock->stripe = 0; /* no longer used */ plex->usedlocks--; /* one less lock */ if (plex->usedlocks == PLEX_LOCKS - 1) /* we were full, */ - wakeup_one(&plex->usedlocks); /* get a waiter if one's there */ - wakeup_one((void *) lock); + (void)wakeup_one(&plex->usedlocks); /* get a waiter if one's there */ + (void)wakeup_one((void *) lock); } /* Get a lock for the global config, wait if it's not available */ Index: sys/kern/kern_synch.c =================================================================== RCS file: /home/ncvs/src/sys/kern/kern_synch.c,v retrieving revision 1.120 diff -u -r1.120 kern_synch.c --- sys/kern/kern_synch.c 2001/01/20 02:57:59 1.120 +++ sys/kern/kern_synch.c 2001/01/20 04:32:32 @@ -840,14 +840,17 @@ * Make a process sleeping on the specified identifier runnable. * May wake more than one process if a target process is currently * swapped out. + * + * Return 0 if nothing was awoken, and the value 1 if a process was + * succesfully removed from the sleep queue. */ -void +int wakeup_one(ident) - register void *ident; + void *ident; { - register struct slpquehead *qp; - register struct proc *p; - int s; + struct slpquehead *qp; + struct proc *p; + int s, awoke = 0; s = splhigh(); mtx_enter(&sched_lock, MTX_SPIN); @@ -869,6 +872,7 @@ if (p->p_flag & P_INMEM) { setrunqueue(p); maybe_resched(p); + awoke = 1; break; } else { p->p_flag |= P_SWAPINREQ; @@ -880,6 +884,7 @@ } mtx_exit(&sched_lock, MTX_SPIN); splx(s); + return (awoke); } /* Index: sys/kern/uipc_socket2.c =================================================================== RCS file: /home/ncvs/src/sys/kern/uipc_socket2.c,v retrieving revision 1.66 diff -u -r1.66 uipc_socket2.c --- sys/kern/uipc_socket2.c 2000/11/19 22:22:47 1.66 +++ sys/kern/uipc_socket2.c 2001/01/20 04:32:32 @@ -125,7 +125,7 @@ TAILQ_INSERT_TAIL(&head->so_comp, so, so_list); so->so_state |= SS_COMP; sorwakeup(head); - wakeup_one(&head->so_timeo); + (void)wakeup_one(&head->so_timeo); } else { wakeup(&so->so_timeo); sorwakeup(so); Index: sys/kern/uipc_syscalls.c =================================================================== RCS file: /home/ncvs/src/sys/kern/uipc_syscalls.c,v retrieving revision 1.83 diff -u -r1.83 uipc_syscalls.c --- sys/kern/uipc_syscalls.c 2001/01/02 11:51:55 1.83 +++ sys/kern/uipc_syscalls.c 2001/01/20 04:32:32 @@ -270,7 +270,7 @@ */ TAILQ_INSERT_HEAD(&head->so_comp, so, so_list); head->so_qlen++; - wakeup_one(&head->so_timeo); + (void)wakeup_one(&head->so_timeo); splx(s); goto done; } @@ -1479,7 +1479,7 @@ SLIST_INSERT_HEAD(&sf_freelist.sf_head, sf, free_list); if (sf_buf_alloc_want) { sf_buf_alloc_want--; - wakeup_one(&sf_freelist); + (void)wakeup_one(&sf_freelist); } mtx_exit(&sf_freelist.sf_lock, MTX_DEF); } Index: sys/sys/mbuf.h =================================================================== RCS file: /home/ncvs/src/sys/sys/mbuf.h,v retrieving revision 1.66 diff -u -r1.66 mbuf.h --- sys/sys/mbuf.h 2000/12/21 21:44:31 1.66 +++ sys/sys/mbuf.h 2001/01/20 04:32:32 @@ -275,7 +275,7 @@ #define MBWAKEUP(m_wid) do { \ if ((m_wid)) { \ m_wid--; \ - wakeup_one(&(m_wid)); \ + (void)wakeup_one(&(m_wid)); \ } \ } while (0) Index: sys/sys/systm.h =================================================================== RCS file: /home/ncvs/src/sys/sys/systm.h,v retrieving revision 1.133 diff -u -r1.133 systm.h --- sys/sys/systm.h 2001/01/19 10:46:58 1.133 +++ sys/sys/systm.h 2001/01/20 04:32:32 @@ -263,7 +263,7 @@ #define await(pri, timo) mawait(NULL, pri, timo) int mawait __P((struct mtx *mtx, int pri, int timo)); void wakeup __P((void *chan)); -void wakeup_one __P((void *chan)); +int wakeup_one __P((void *chan)); /* * Common `dev_t' stuff are declared here to avoid #include poisoning Index: sys/ufs/ffs/ffs_softdep.c =================================================================== RCS file: /home/ncvs/src/sys/ufs/ffs/ffs_softdep.c,v retrieving revision 1.80 diff -u -r1.80 ffs_softdep.c --- sys/ufs/ffs/ffs_softdep.c 2000/12/13 08:30:30 1.80 +++ sys/ufs/ffs/ffs_softdep.c 2001/01/20 04:32:32 @@ -540,12 +540,12 @@ if (req_clear_inodedeps) { clear_inodedeps(p); req_clear_inodedeps -= 1; - wakeup_one(&proc_waiting); + (void)wakeup_one(&proc_waiting); } if (req_clear_remove) { clear_remove(p); req_clear_remove -= 1; - wakeup_one(&proc_waiting); + (void)wakeup_one(&proc_waiting); } loopcount = 1; starttime = time_second; @@ -559,12 +559,12 @@ if (req_clear_inodedeps) { clear_inodedeps(p); req_clear_inodedeps -= 1; - wakeup_one(&proc_waiting); + (void)wakeup_one(&proc_waiting); } if (req_clear_remove) { clear_remove(p); req_clear_remove -= 1; - wakeup_one(&proc_waiting); + (void)wakeup_one(&proc_waiting); } /* * We do not generally want to stop for buffer space, but if @@ -4491,7 +4491,7 @@ { *stat_countp += 1; - wakeup_one(&proc_waiting); + (void)wakeup_one(&proc_waiting); if (proc_waiting > 0) handle = timeout(pause_timer, 0, tickdelay > 2 ? tickdelay : 2); else