MCPcopy Create free account
hub / github.com/F-Stack/f-stack / cpu_activeclock

Function cpu_activeclock

freebsd/kern/kern_clocksource.c:793–815  ·  view source on GitHub ↗

* Switch to active mode (skip empty ticks). */

Source from the content-addressed store, hash-verified

791 * Switch to active mode (skip empty ticks).
792 */
793void
794cpu_activeclock(void)
795{
796 sbintime_t now;
797 struct pcpu_state *state;
798 struct thread *td;
799
800 state = DPCPU_PTR(timerstate);
801 if (state->idle == 0 || busy)
802 return;
803 if (periodic)
804 now = state->now;
805 else
806 now = sbinuptime();
807 CTR3(KTR_SPARE2, "active at %d: now %d.%08x",
808 curcpu, (int)(now >> 32), (u_int)(now & 0xffffffff));
809 spinlock_enter();
810 td = curthread;
811 td->td_intr_nesting_level++;
812 handleevents(now, 1);
813 td->td_intr_nesting_level--;
814 spinlock_exit();
815}
816
817/*
818 * Change the frequency of the given timer. This changes et->et_frequency and

Callers 4

cpu_idleFunction · 0.85
cpu_idleFunction · 0.85
cpu_idleFunction · 0.85
cpu_idleFunction · 0.85

Calls 4

sbinuptimeFunction · 0.85
handleeventsFunction · 0.85
spinlock_enterFunction · 0.50
spinlock_exitFunction · 0.50

Tested by

no test coverage detected