.th K_nap II 4/21/86
.sh NAME
K_nap - delay process execution
.sh "MODULA SYNOPSIS"
.nh
.na
 CONST timeOut: cardinal;
.br
 VAR stat: K_err_num;
.br
 . . .
.br
 stat := NK_nap(timeOut);
.br
.hy
.ad
.sp
.sh "C SYNOPSIS"
.nh
.na
 cardinal timeOut;
.br
 int stat;
.br
 . . .
.br
 stat = K_nap (timeOut);
.br
.hy
.ad
.sh DESCRIPTION
K_nap is a mechanism for explicitly giving up the processor when a
higher level blocking condition occurs.  This situation occurs when,
for example, processes implementing semaphores on top of the Kernel
become logically blocked on a semaphore.  K_nap provides an alternative
to busy waiting for the semaphore.  The timeOut argument is the
incremental time (in 1/10th second clock ticks) before which the
process should not be rescheduled by the Kernel.  Processes using K_nap
should check that the logical condition for which they were waiting has
occurred when they are activated.
.sh "EXCEPTIONS"
.lp 22 15
K_nap does return any exceptions.

