-/* $OpenBSD: clock.c,v 1.9 2023/02/04 19:19:36 cheloha Exp $ */
+/* $OpenBSD: clock.c,v 1.10 2023/02/04 23:20:54 cheloha Exp $ */
/*
* Copyright (c) 2020 Mark Kettenis <kettenis@openbsd.org>
void
dec_rearm(void *unused, uint64_t nsecs)
{
- u_long s;
uint32_t cycles;
if (nsecs > dec_nsec_max)
cycles = (nsecs * dec_nsec_cycle_ratio) >> 32;
if (cycles > UINT32_MAX >> 1)
cycles = UINT32_MAX >> 1;
- s = intr_disable();
mtdec(cycles);
- intr_restore(s);
}
void