summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2004-03-12 19:06:18 +0000
committerjhb <jhb@FreeBSD.org>2004-03-12 19:06:18 +0000
commitc754b5af4765745790fa2703782920375410ba08 (patch)
treed0d728973ba60a3d4ff65c79d64db034a4d360d3 /sys/kern
parent6103cfbeb58b0d8dfa81f7dccda676cb1f6dbd2b (diff)
downloadFreeBSD-src-c754b5af4765745790fa2703782920375410ba08.zip
FreeBSD-src-c754b5af4765745790fa2703782920375410ba08.tar.gz
- Remove old sleep queues.
- Remove sleepqueue argument from sleepq_set_timeout() since it is not used.
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/kern_condvar.c4
-rw-r--r--sys/kern/kern_synch.c14
-rw-r--r--sys/kern/subr_sleepqueue.c2
3 files changed, 4 insertions, 16 deletions
diff --git a/sys/kern/kern_condvar.c b/sys/kern/kern_condvar.c
index 0816213..6fff7e0 100644
--- a/sys/kern/kern_condvar.c
+++ b/sys/kern/kern_condvar.c
@@ -245,7 +245,7 @@ cv_timedwait(struct cv *cvp, struct mtx *mp, int timo)
mtx_unlock(mp);
sleepq_add(sq, cvp, mp, cvp->cv_description, SLEEPQ_CONDVAR);
- sleepq_set_timeout(sq, cvp, timo);
+ sleepq_set_timeout(cvp, timo);
rval = sleepq_timedwait(cvp, 0);
#ifdef KTRACE
@@ -303,7 +303,7 @@ cv_timedwait_sig(struct cv *cvp, struct mtx *mp, int timo)
mtx_unlock(mp);
sleepq_add(sq, cvp, mp, cvp->cv_description, SLEEPQ_CONDVAR);
- sleepq_set_timeout(sq, cvp, timo);
+ sleepq_set_timeout(cvp, timo);
sig = sleepq_catch_signals(cvp);
/*
* XXX: Missing magic return value handling for no signal
diff --git a/sys/kern/kern_synch.c b/sys/kern/kern_synch.c
index 89c6bbc..4c29e5d 100644
--- a/sys/kern/kern_synch.c
+++ b/sys/kern/kern_synch.c
@@ -99,23 +99,11 @@ SYSCTL_INT(_kern, OID_AUTO, fscale, CTLFLAG_RD, 0, FSCALE, "");
static void loadav(void *arg);
static void lboltcb(void *arg);
-/*
- * We're only looking at 7 bits of the address; everything is
- * aligned to 4, lots of things are aligned to greater powers
- * of 2. Shift right by 8, i.e. drop the bottom 256 worth.
- */
-#define TABLESIZE 128
-static TAILQ_HEAD(slpquehead, thread) slpque[TABLESIZE];
-#define LOOKUP(x) (((intptr_t)(x) >> 8) & (TABLESIZE - 1))
-
void
sleepinit(void)
{
- int i;
hogticks = (hz / 10) * 2; /* Default only. */
- for (i = 0; i < TABLESIZE; i++)
- TAILQ_INIT(&slpque[i]);
init_sleepqueues();
}
@@ -236,7 +224,7 @@ msleep(ident, mtx, priority, wmesg, timo)
*/
sleepq_add(sq, ident, mtx, wmesg, 0);
if (timo)
- sleepq_set_timeout(sq, ident, timo);
+ sleepq_set_timeout(ident, timo);
if (catch) {
sig = sleepq_catch_signals(ident);
if (sig == 0 && !TD_ON_SLEEPQ(td)) {
diff --git a/sys/kern/subr_sleepqueue.c b/sys/kern/subr_sleepqueue.c
index 5ed8a3f..1dc3409 100644
--- a/sys/kern/subr_sleepqueue.c
+++ b/sys/kern/subr_sleepqueue.c
@@ -267,7 +267,7 @@ sleepq_add(struct sleepqueue *sq, void *wchan, struct mtx *lock,
* sleep queue after timo ticks if the thread has not already been awakened.
*/
void
-sleepq_set_timeout(struct sleepqueue *sq, void *wchan, int timo)
+sleepq_set_timeout(void *wchan, int timo)
{
struct sleepqueue_chain *sc;
struct thread *td;
OpenPOWER on IntegriCloud