.TH busyWait() "" "" "Internal Kernel Routine"
.PC "Busy-wait the system, pending some event"
\fBint busyWait(\fIfn\fB, \fIticks\^\fB)\fR
\fBint (*\fIfn\^\fB)(), \fIticks\^\fB;\fR
.PP
.B busyWait()
repeatedly calls the function to which \fIfn\fR points.
It returns when
.I fn
returns a non-zero value,
or after \fIticks\fR clock ticks have elapsed, whichever happens first.
If
.I fn
is NULL,
.B busyWait()
waits unconditionally.
.PP
.B busyWait()
returns one if \fIfn\fR returned a nonzero value, or zero if it has timed out.
.SH "See Also"
.B
busyWait2(),
drv_usecwait(),
internal kernel routines
.R
.SH Notes
Each tick is one one-hundredth of a second.
Busy-waiting the system for even one clock tick is a bad idea, except
while testing a driver or during system start-up.
