summaryrefslogtreecommitdiff
path: root/sys/man/9
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2019-11-20 16:05:52 -0800
committerOri Bernstein <ori@eigenstate.org>2019-11-20 16:05:52 -0800
commit0ff4099a608e58970d6ad38cef5b27c53fd3bbf4 (patch)
tree2cb13bbf35a8fdecfab5bc2325608e62cb263618 /sys/man/9
parent48a804e3fde18b306385845ee8af4b64096388aa (diff)
improve language in delay(9)
give the reader enough context to know when to use and not use the delay family of functions.
Diffstat (limited to 'sys/man/9')
-rw-r--r--sys/man/9/delay16
1 files changed, 10 insertions, 6 deletions
diff --git a/sys/man/9/delay b/sys/man/9/delay
index b17f743f3..1a41c85b8 100644
--- a/sys/man/9/delay
+++ b/sys/man/9/delay
@@ -15,18 +15,22 @@ Timer* addclock0link(void(*clockf)(void), int ms)
.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
.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