summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Gray <jsg@jsg.id.au>2013-03-18 21:38:17 +1100
committerJonathan Gray <jsg@jsg.id.au>2013-03-18 21:38:17 +1100
commita725689ddd5bf6ff10604c43ec648a821c83d015 (patch)
tree7431fe5c9a12f2dd299b506e08e372a394599f88
parentc1d76daf2e0c8ab8c962e3b7cc2c17fe5db5765e (diff)
Revert "have wakeup return the number of processes woken up"kms/intel
This reverts commit 52685f417729ae0089f640bc756c8160830c8618.
-rw-r--r--sys/kern/kern_synch.c14
-rw-r--r--sys/sys/systm.h4
2 files changed, 7 insertions, 11 deletions
diff --git a/sys/kern/kern_synch.c b/sys/kern/kern_synch.c
index 084a194c847..f1db615348b 100644
--- a/sys/kern/kern_synch.c
+++ b/sys/kern/kern_synch.c
@@ -350,13 +350,13 @@ unsleep(struct proc *p)
/*
* Make a number of processes sleeping on the specified identifier runnable.
*/
-int
+void
wakeup_n(const volatile void *ident, int n)
{
struct slpque *qp;
struct proc *p;
struct proc *pnext;
- int s, woken = 0;
+ int s;
SCHED_LOCK(s);
qp = &slpque[LOOKUP(ident)];
@@ -370,24 +370,20 @@ wakeup_n(const volatile void *ident, int n)
--n;
p->p_wchan = 0;
TAILQ_REMOVE(qp, p, p_runq);
- if (p->p_stat == SSLEEP) {
+ if (p->p_stat == SSLEEP)
setrunnable(p);
- woken++;
- }
}
}
SCHED_UNLOCK(s);
-
- return (woken);
}
/*
* Make all processes sleeping on the specified identifier runnable.
*/
-int
+void
wakeup(const volatile void *chan)
{
- return (wakeup_n(chan, -1));
+ wakeup_n(chan, -1);
}
int
diff --git a/sys/sys/systm.h b/sys/sys/systm.h
index bd5a39f1d5d..dd3823db0c8 100644
--- a/sys/sys/systm.h
+++ b/sys/sys/systm.h
@@ -250,8 +250,8 @@ int sleep_finish_signal(struct sleep_state *);
void sleep_queue_init(void);
struct mutex;
-int wakeup_n(const volatile void *, int);
-int wakeup(const volatile void *);
+void wakeup_n(const volatile void *, int);
+void wakeup(const volatile void *);
#define wakeup_one(c) wakeup_n((c), 1)
int tsleep(const volatile void *, int, const char *, int);
int msleep(const volatile void *, struct mutex *, int, const char*, int);