Index: sys/boot/kshim/bsd_kernel.c =================================================================== --- sys/boot/kshim/bsd_kernel.c +++ sys/boot/kshim/bsd_kernel.c @@ -138,6 +138,7 @@ { int start = ticks; int delta; + int time = 0; if (cv->sleeping) return (EWOULDBLOCK); /* not allowed */ @@ -149,12 +150,21 @@ delta = ticks - start; if (delta >= timo || delta < 0) break; + ticks++; } mtx_unlock(mtx); usb_idle(); mtx_lock(mtx); + + if (++time >= (1000 / hz)) { + time = 0; + callout_process(1); + } + + /* Sleep for 1 tick */ + delay(1000000 / hz); } if (cv->sleeping) {