-/* $OpenBSD: clock.c,v 1.71 2021/10/24 17:05:04 mpi Exp $ */
+/* $OpenBSD: clock.c,v 1.72 2022/11/10 07:08:01 jmatthew Exp $ */
/* $NetBSD: clock.c,v 1.41 2001/07/24 19:29:25 eeh Exp $ */
/*
level0.ih_number = 1;
strlcpy(level0.ih_name, "clock", sizeof(level0.ih_name));
intr_establish(10, &level0);
+ evcount_percpu(&level0.ih_count);
/* We only have one timer so we have no statclock */
stathz = 0;
while (ci->ci_tick < tick()) {
ci->ci_tick += tick_increment;
hardclock((struct clockframe *)cap);
- atomic_add_long((unsigned long *)&level0.ih_count.ec_count, 1);
+ evcount_inc(&level0.ih_count);
}
/* Reset the interrupt. */
while (ci->ci_tick < sys_tick()) {
ci->ci_tick += tick_increment;
hardclock((struct clockframe *)cap);
- atomic_add_long((unsigned long *)&level0.ih_count.ec_count, 1);
+ evcount_inc(&level0.ih_count);
}
/* Reset the interrupt. */
while (ci->ci_tick < stick()) {
ci->ci_tick += tick_increment;
hardclock((struct clockframe *)cap);
- atomic_add_long((unsigned long *)&level0.ih_count.ec_count, 1);
+ evcount_inc(&level0.ih_count);
}
/* Reset the interrupt. */