Index: sched_ule.c =================================================================== RCS file: /usr/cvs/src/sys/kern/sched_ule.c,v retrieving revision 1.246 diff -u -r1.246 sched_ule.c --- sched_ule.c 19 Jul 2008 05:13:47 -0000 1.246 +++ sched_ule.c 11 Nov 2008 16:36:25 -0000 @@ -942,7 +942,7 @@ static void tdq_notify(struct tdq *tdq, struct thread *td) { - int cpri; + struct thread *ctd; int pri; int cpu; @@ -950,10 +950,10 @@ return; cpu = td->td_sched->ts_cpu; pri = td->td_priority; - cpri = pcpu_find(cpu)->pc_curthread->td_priority; - if (!sched_shouldpreempt(pri, cpri, 1)) + ctd = pcpu_find(cpu)->pc_curthread; + if (!sched_shouldpreempt(pri, ctd->td_priority, 1)) return; - if (TD_IS_IDLETHREAD(td)) { + if (TD_IS_IDLETHREAD(ctd)) { /* * If the idle thread is still 'running' it's probably * waiting on us to release the tdq spinlock already. No