Verify "smp_started" is true before calling

sched_bind() and sched_unbind().

Reviewed by:	kmacy
MFC after:	3 days
This commit is contained in:
Qing Li 2009-10-22 00:32:01 +00:00
parent 9b683f8da6
commit fc02477e1c

View file

@ -963,15 +963,19 @@ flowtable_clean_vnet(void)
if (CPU_ABSENT(i))
continue;
thread_lock(curthread);
sched_bind(curthread, i);
thread_unlock(curthread);
if (smp_started == 1) {
thread_lock(curthread);
sched_bind(curthread, i);
thread_unlock(curthread);
}
flowtable_free_stale(ft, NULL);
thread_lock(curthread);
sched_unbind(curthread);
thread_unlock(curthread);
if (smp_started == 1) {
thread_lock(curthread);
sched_unbind(curthread);
thread_unlock(curthread);
}
}
} else {
flowtable_free_stale(ft, NULL);