summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_switch.c
diff options
context:
space:
mode:
authorjeff <jeff@FreeBSD.org>2007-01-04 12:10:58 +0000
committerjeff <jeff@FreeBSD.org>2007-01-04 12:10:58 +0000
commit60a15a9f22590ef52b2b2ed230ce5c44a07a947a (patch)
treee49e49b5201f14ef73e1a0835a46f048d5b3cd68 /sys/kern/kern_switch.c
parent876ba7f8b04721e26633ef431f176bf959397328 (diff)
downloadFreeBSD-src-60a15a9f22590ef52b2b2ed230ce5c44a07a947a.zip
FreeBSD-src-60a15a9f22590ef52b2b2ed230ce5c44a07a947a.tar.gz
- Don't pass a pointer into runq_choose_from(). The caller can adjust the
index if it chooses to.
Diffstat (limited to 'sys/kern/kern_switch.c')
-rw-r--r--sys/kern/kern_switch.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/kern/kern_switch.c b/sys/kern/kern_switch.c
index 16a69f4..48c1e0a 100644
--- a/sys/kern/kern_switch.c
+++ b/sys/kern/kern_switch.c
@@ -556,21 +556,20 @@ runq_choose(struct runq *rq)
}
struct td_sched *
-runq_choose_from(struct runq *rq, int *idx)
+runq_choose_from(struct runq *rq, int idx)
{
struct rqhead *rqh;
struct td_sched *ts;
int pri;
mtx_assert(&sched_lock, MA_OWNED);
- if ((pri = runq_findbit_from(rq, *idx)) != -1) {
+ if ((pri = runq_findbit_from(rq, idx)) != -1) {
rqh = &rq->rq_queues[pri];
ts = TAILQ_FIRST(rqh);
KASSERT(ts != NULL, ("runq_choose: no proc on busy queue"));
CTR4(KTR_RUNQ,
"runq_choose_from: pri=%d kse=%p idx=%d rqh=%p",
pri, ts, ts->ts_rqindex, rqh);
- *idx = ts->ts_rqindex;
return (ts);
}
CTR1(KTR_RUNQ, "runq_choose_from: idleproc pri=%d", pri);
OpenPOWER on IntegriCloud