--- src/sys/kern/lwkt_thread.c 2004/10/13 18:42:34 1.70 +++ src/sys/kern/lwkt_thread.c 2005/04/13 04:02:08 1.71 @@ -472,7 +472,6 @@ lwkt_switch(void) td->td_release(td); crit_enter_gd(gd); - ++switch_count; #ifdef SMP /* @@ -630,8 +629,10 @@ again: ASSERT_MP_LOCK_HELD(); } #endif - if (td != ntd) + if (td != ntd) { + ++switch_count; td->td_switch(ntd); + } /* NOTE: current cpu may have changed after switch */ crit_exit_quick(td); }