improve language in delay(9)

give the reader enough context to know when to use and not
use the delay family of functions.
This commit is contained in:
Ori Bernstein 2019-11-20 16:05:52 -08:00
parent 48a804e3fd
commit 0ff4099a60

View file

@ -15,18 +15,22 @@ Timer* addclock0link(void(*clockf)(void), int ms)
.I Delay .I Delay
busy waits for busy waits for
.I ms .I ms
milliseconds, forced to be at least one millisecond on some architectures. milliseconds. The minimum value of
.I ms
is one on most architectures.
.PP .PP
.I Microdelay .I Microdelay
works exactly the same as works exactly the same as
.I delay .I delay
but using microseconds instead. but using microseconds instead.
.PP .PP
For delays on the order of clock ticks, These routines are intended for use in interrupt contexts,
.I tsleep device reset and shutdown functions, and other places where
(see the scheduler is unavailable.
.IR sleep (9)) When you have a process context, and can sleep, consider
provides a better alternative to the busy waiting of these routines. .IR tsleep (9).
.I Tsleep
does not busy wait.
.PP .PP
.I Addclock0link .I Addclock0link
adds a new periodic timer to the current processor's timer list, with adds a new periodic timer to the current processor's timer list, with