- Remove old sleep queues.
- Remove sleepqueue argument from sleepq_set_timeout() since it is not used.
This commit is contained in:
parent
595bc82a1d
commit
1ed3e44f22
@ -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
|
||||
|
@ -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)) {
|
||||
|
@ -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;
|
||||
|
@ -97,7 +97,7 @@ struct sleepqueue *sleepq_lookup(void *);
|
||||
void sleepq_release(void *);
|
||||
void sleepq_remove(struct thread *, void *);
|
||||
void sleepq_signal(void *, int, int);
|
||||
void sleepq_set_timeout(struct sleepqueue *sq, void *wchan, int timo);
|
||||
void sleepq_set_timeout(void *wchan, int timo);
|
||||
int sleepq_timedwait(void *wchan, int signal_caught);
|
||||
int sleepq_timedwait_sig(void *wchan, int signal_caught);
|
||||
void sleepq_wait(void *);
|
||||
|
Loading…
Reference in New Issue
Block a user