Fix build without SMP.
MFC after: 1 month
This commit is contained in:
parent
e745d729be
commit
8db1669959
@ -2118,7 +2118,10 @@ sched_switch(struct thread *td, int flags)
|
|||||||
struct td_sched *ts;
|
struct td_sched *ts;
|
||||||
struct mtx *mtx;
|
struct mtx *mtx;
|
||||||
int srqflag;
|
int srqflag;
|
||||||
int cpuid, pickcpu, preempted;
|
int cpuid, preempted;
|
||||||
|
#ifdef SMP
|
||||||
|
int pickcpu;
|
||||||
|
#endif
|
||||||
|
|
||||||
THREAD_LOCK_ASSERT(td, MA_OWNED);
|
THREAD_LOCK_ASSERT(td, MA_OWNED);
|
||||||
|
|
||||||
@ -2126,11 +2129,13 @@ sched_switch(struct thread *td, int flags)
|
|||||||
tdq = TDQ_SELF();
|
tdq = TDQ_SELF();
|
||||||
ts = td_get_sched(td);
|
ts = td_get_sched(td);
|
||||||
sched_pctcpu_update(ts, 1);
|
sched_pctcpu_update(ts, 1);
|
||||||
|
#ifdef SMP
|
||||||
pickcpu = (td->td_flags & TDF_PICKCPU) != 0;
|
pickcpu = (td->td_flags & TDF_PICKCPU) != 0;
|
||||||
if (pickcpu)
|
if (pickcpu)
|
||||||
ts->ts_rltick = ticks - affinity * MAX_CACHE_LEVELS;
|
ts->ts_rltick = ticks - affinity * MAX_CACHE_LEVELS;
|
||||||
else
|
else
|
||||||
ts->ts_rltick = ticks;
|
ts->ts_rltick = ticks;
|
||||||
|
#endif
|
||||||
td->td_lastcpu = td->td_oncpu;
|
td->td_lastcpu = td->td_oncpu;
|
||||||
preempted = (td->td_flags & TDF_SLICEEND) == 0 &&
|
preempted = (td->td_flags & TDF_SLICEEND) == 0 &&
|
||||||
(flags & SW_PREEMPT) != 0;
|
(flags & SW_PREEMPT) != 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user