getnextevent: put variable only used by KTR under ifdef KTR

This commit is contained in:
Matt Macy 2018-05-19 04:05:36 +00:00
parent bfd0eacb02
commit 5cc2d25a2b

View File

@ -272,18 +272,22 @@ getnextevent(void)
#ifdef SMP
int cpu;
#endif
#ifdef KTR
int c;
c = -1;
#endif
state = DPCPU_PTR(timerstate);
event = state->nextevent;
c = -1;
#ifdef SMP
if ((timer->et_flags & ET_FLAGS_PERCPU) == 0) {
CPU_FOREACH(cpu) {
state = DPCPU_ID_PTR(cpu, timerstate);
if (event > state->nextevent) {
event = state->nextevent;
#ifdef KTR
c = cpu;
#endif
}
}
}