| 1081 | } |
| 1082 | |
| 1083 | static void |
| 1084 | itimer_start(void) |
| 1085 | { |
| 1086 | static const struct kclock rt_clock = { |
| 1087 | .timer_create = realtimer_create, |
| 1088 | .timer_delete = realtimer_delete, |
| 1089 | .timer_settime = realtimer_settime, |
| 1090 | .timer_gettime = realtimer_gettime, |
| 1091 | }; |
| 1092 | |
| 1093 | itimer_zone = uma_zcreate("itimer", sizeof(struct itimer), |
| 1094 | NULL, NULL, itimer_init, itimer_fini, UMA_ALIGN_PTR, 0); |
| 1095 | register_posix_clock(CLOCK_REALTIME, &rt_clock); |
| 1096 | register_posix_clock(CLOCK_MONOTONIC, &rt_clock); |
| 1097 | p31b_setcfg(CTL_P1003_1B_TIMERS, 200112L); |
| 1098 | p31b_setcfg(CTL_P1003_1B_DELAYTIMER_MAX, INT_MAX); |
| 1099 | p31b_setcfg(CTL_P1003_1B_TIMER_MAX, TIMER_MAX); |
| 1100 | } |
| 1101 | |
| 1102 | static int |
| 1103 | register_posix_clock(int clockid, const struct kclock *clk) |
nothing calls this directly
no test coverage detected