From: rgl@antares-labs.eu
To: /tmp/patch/sleep.9.patch@antares-labs.eu, 9front@9front.org
Subject: Re: [9front] man: new section 9
Date: Sat, 16 Nov 2019 13:52:25 +0100 [thread overview]
Message-ID: <30AFF1C5064196F4680421D88AE85224@antares-labs.eu> (raw)
In-Reply-To: 4EBBAA2AFB3EA490574FB941BCD5F0FE@antares-labs.eu
[-- Attachment #1: Type: text/plain, Size: 23 bytes --]
ok, another two pages.
[-- Attachment #2: Type: text/plain, Size: 1096 bytes --]
diff -r 159c7e7ca171 sys/man/9/delay
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/man/9/delay Sat Nov 16 13:13:43 2019 +0100
@@ -0,0 +1,46 @@
+.TH DELAY 9
+.SH NAME
+delay, microdelay, addclock0link \- small delays, clock interrupts
+.SH SYNOPSIS
+.ta \w'\fLTimer* 'u
+.B
+void delay(int ms)
+.PP
+.B
+void microdelay(int µs)
+.PP
+.B
+Timer* addclock0link(void(*clockf)(void), int ms)
+.SH DESCRIPTION
+.I Delay
+busy waits for
+.I ms
+milliseconds, forced to be at least one millisecond on some 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.
+.PP
+.I Addclock0link
+adds a new periodic timer to the current processor's timer list, with
+.I clockf
+executing every
+.I ms
+milliseconds. If
+.I ms
+is zero a default clock is used, it will panic otherwise (i.e.
+.I ms
+< 0).
+.SH SOURCE
+.B /sys/src/9/port/portclock.c
+.br
+.B /sys/src/9/*/clock.c
+.SH SEE ALSO
+.IR sleep (9)
next reply other threads:[~2019-11-16 12:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-16 12:52 rgl [this message]
2019-11-16 12:53 rgl
2019-11-16 17:23 rgl
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=30AFF1C5064196F4680421D88AE85224@antares-labs.eu \
--to=rgl@antares-labs.eu \
--cc=/tmp/patch/sleep.9.patch@antares-labs.eu \
--cc=9front@9front.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).