ref: b358cdbb6cb8613dbe574668e7a99eeffad52f11
parent: e722f9bd514b34b9032cb1a1c536fdf8c3805063
author: Ori Bernstein <ori@eigenstate.org>
date: Wed Nov 20 11:05:52 EST 2019
improve language in delay(9) give the reader enough context to know when to use and not use the delay family of functions.
--- a/sys/man/9/delay
+++ b/sys/man/9/delay
@@ -15,7 +15,9 @@
.I Delay
busy waits for
.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
.I Microdelay
works exactly the same as
@@ -22,11 +24,13 @@
.I delay
but using microseconds instead.
.PP
-For delays on the order of clock ticks,
-.I tsleep
-(see
-.IR sleep (9))
-provides a better alternative to the busy waiting of these routines.
+These routines are intended for use in interrupt contexts,
+device reset and shutdown functions, and other places where
+the scheduler is unavailable.
+When you have a process context, and can sleep, consider
+.IR tsleep (9).
+.I Tsleep
+does not busy wait.
.PP
.I Addclock0link
adds a new periodic timer to the current processor's timer list, with
--
⑨