FreeBSD/sys/kern/kern_clocksource.c
/*
 * Switch to active mode (skip empty ticks).
 */
Switch to active mode (skip empty ticks).
Switch to active mode ( skip empty ticks ) .
void
cpu_activeclock(void)
{
	sbintime_t now;
	struct pcpu_state *state;
	struct thread *td;
	state = DPCPU_PTR(timerstate);
	if (state->idle == 0 || busy)
		return;
	if (periodic)
		now = state->now;
	else
		now = sbinuptime();
	CTR3(KTR_SPARE2, "active at %d:  now  %d.%08x",
	    curcpu, (int)(now >> 32), (u_int)(now & 0xffffffff));
	spinlock_enter();
	td = curthread;
	td->td_intr_nesting_level++;
	handleevents(now, 1);
	td->td_intr_nesting_level--;
	spinlock_exit();
}
void cpu_activeclock ( void ) { sbintime_t now ; struct pcpu_state * state ; struct thread * td ; state = DPCPU_PTR ( timerstate ) ; if ( state -> idle == 0 || busy ) return ; if ( periodic ) now = state -> now ; else now = sbinuptime ( ) ; CTR3 ( KTR_SPARE2 , " " , curcpu , ( int ) ( now >> 32 ) , ( u_int ) ( now & 0xffffffff ) ) ; spinlock_enter ( ) ; td = curthread ; td -> td_intr_nesting_level ++ ; handleevents ( now , 1 ) ; td -> td_intr_nesting_level -- ; spinlock_exit ( ) ; }
Switch to active mode (skip empty ticks).
Switch to active mode ( skip empty ticks ) .