* Initialize clock frequencies and start both clocks running. */ ARGSUSED*/
| 393 | */ |
| 394 | /* ARGSUSED*/ |
| 395 | static void |
| 396 | initclocks(void *dummy) |
| 397 | { |
| 398 | int i; |
| 399 | |
| 400 | /* |
| 401 | * Set divisors to 1 (normal case) and let the machine-specific |
| 402 | * code do its bit. |
| 403 | */ |
| 404 | mtx_init(&time_lock, "time lock", NULL, MTX_DEF); |
| 405 | cpu_initclocks(); |
| 406 | |
| 407 | /* |
| 408 | * Compute profhz/stathz, and fix profhz if needed. |
| 409 | */ |
| 410 | i = stathz ? stathz : hz; |
| 411 | if (profhz == 0) |
| 412 | profhz = i; |
| 413 | psratio = profhz / i; |
| 414 | |
| 415 | #ifdef SW_WATCHDOG |
| 416 | /* Enable hardclock watchdog now, even if a hardware watchdog exists. */ |
| 417 | watchdog_attach(); |
| 418 | #else |
| 419 | /* Volunteer to run a software watchdog. */ |
| 420 | if (wdog_software_attach == NULL) |
| 421 | wdog_software_attach = watchdog_attach; |
| 422 | #endif |
| 423 | } |
| 424 | |
| 425 | static __noinline void |
| 426 | hardclock_itimer(struct thread *td, struct pstats *pstats, int cnt, int usermode) |
nothing calls this directly
no test coverage detected