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

Function setuptimer

freebsd/kern/kern_clocksource.c:423–438  ·  view source on GitHub ↗

* Prepare event timer parameters after configuration changes. */

Source from the content-addressed store, hash-verified

421 * Prepare event timer parameters after configuration changes.
422 */
423static void
424setuptimer(void)
425{
426 int freq;
427
428 if (periodic && (timer->et_flags & ET_FLAGS_PERIODIC) == 0)
429 periodic = 0;
430 else if (!periodic && (timer->et_flags & ET_FLAGS_ONESHOT) == 0)
431 periodic = 1;
432 singlemul = MIN(MAX(singlemul, 1), 20);
433 freq = hz * singlemul;
434 while (freq < (profiling ? profhz : stathz))
435 freq += hz;
436 freq = round_freq(timer, freq);
437 timerperiod = SBT_1S / freq;
438}
439
440/*
441 * Reconfigure specified per-CPU timer on other CPU. Called from IPI handler.

Callers 1

kern_clocksource.cFile · 0.85

Calls 1

round_freqFunction · 0.85

Tested by

no test coverage detected