diff --git a/sys/kern/kern_switch.c b/sys/kern/kern_switch.c index 13805eec60c9..1ccf64c0804d 100644 --- a/sys/kern/kern_switch.c +++ b/sys/kern/kern_switch.c @@ -306,7 +306,7 @@ runq_findbit(struct runq *rq) } static __inline int -runq_findbit_from(struct runq *rq, int start) +runq_findbit_from(struct runq *rq, u_char start) { struct rqbits *rqb; int bit; @@ -388,7 +388,7 @@ runq_add(struct runq *rq, struct td_sched *ts, int flags) } void -runq_add_pri(struct runq *rq, struct td_sched *ts, int pri, int flags) +runq_add_pri(struct runq *rq, struct td_sched *ts, u_char pri, int flags) { struct rqhead *rqh; @@ -478,7 +478,7 @@ runq_choose(struct runq *rq) } struct td_sched * -runq_choose_from(struct runq *rq, int idx) +runq_choose_from(struct runq *rq, u_char idx) { struct rqhead *rqh; struct td_sched *ts; @@ -511,10 +511,10 @@ runq_remove(struct runq *rq, struct td_sched *ts) } void -runq_remove_idx(struct runq *rq, struct td_sched *ts, int *idx) +runq_remove_idx(struct runq *rq, struct td_sched *ts, u_char *idx) { struct rqhead *rqh; - int pri; + u_char pri; KASSERT(ts->ts_thread->td_proc->p_sflag & PS_INMEM, ("runq_remove_idx: process swapped out")); diff --git a/sys/kern/sched_ule.c b/sys/kern/sched_ule.c index 5ddd415dfbf3..4ed52168b23e 100644 --- a/sys/kern/sched_ule.c +++ b/sys/kern/sched_ule.c @@ -178,10 +178,10 @@ struct tdq { struct runq tdq_idle; /* Queue of IDLE threads. */ struct runq tdq_timeshare; /* timeshare run queue. */ struct runq tdq_realtime; /* real-time run queue. */ - int tdq_idx; /* Current insert index. */ - int tdq_ridx; /* Current removal index. */ + u_char tdq_idx; /* Current insert index. */ + u_char tdq_ridx; /* Current removal index. */ + short tdq_flags; /* Thread queue flags */ int tdq_load; /* Aggregate load. */ - int tdq_flags; /* Thread queue flags */ #ifdef SMP int tdq_transferable; LIST_ENTRY(tdq) tdq_siblings; /* Next in tdq group. */ @@ -368,7 +368,7 @@ tdq_runq_add(struct tdq *tdq, struct td_sched *ts, int flags) } #endif if (ts->ts_runq == &tdq->tdq_timeshare) { - int pri; + u_char pri; pri = ts->ts_thread->td_priority; KASSERT(pri <= PRI_MAX_TIMESHARE && pri >= PRI_MIN_TIMESHARE, diff --git a/sys/sys/runq.h b/sys/sys/runq.h index 6e7e5d9c2fd6..4b14e2d42d0d 100644 --- a/sys/sys/runq.h +++ b/sys/sys/runq.h @@ -63,12 +63,12 @@ struct runq { }; void runq_add(struct runq *, struct td_sched *, int); -void runq_add_pri(struct runq *, struct td_sched *, int, int); +void runq_add_pri(struct runq *, struct td_sched *, u_char, int); int runq_check(struct runq *); struct td_sched *runq_choose(struct runq *); -struct td_sched *runq_choose_from(struct runq *, int); +struct td_sched *runq_choose_from(struct runq *, u_char); void runq_init(struct runq *); void runq_remove(struct runq *, struct td_sched *); -void runq_remove_idx(struct runq *, struct td_sched *, int *); +void runq_remove_idx(struct runq *, struct td_sched *, u_char *); #endif