# HG changeset patch # User Erik Quanstrom # Date 1318180392 -7200 # Node ID 416dd0cda909c83494c1af34674ae7889320a434 # Parent 9c68df83fb57bac26dab17dee7f76bb0061ab493 man section 9: a few nits 1. tech /bin/man and the manual mk system about section 9, and support section 10 (which i use for provinçial customs and commands) 2. fix a few small nits in section 9, note that clocklink0 only runs on a single processor (processor 0), and expand on parsecmd(9). R=nixiedev, noah.evans CC=nix-dev http://codereview.appspot.com/5249042 Committer: Noah Evans diff -r 9c68df83fb57 -r 416dd0cda909 rc/bin/man --- a/rc/bin/man Thu Oct 06 22:51:31 2011 +0200 +++ b/rc/bin/man Sun Oct 09 19:13:12 2011 +0200 @@ -59,7 +59,7 @@ search=yes while(~ $d 0) { if(~ $#* 0) { - echo 'Usage: man [-bntpPSw] [0-9] [0-9] ... name1 name2 ...' >[1=2] + echo 'Usage: man [-bntpPSw] [sec] [sec] ... name1 name2 ...' >[1=2] exit } if(test -d $S/$1){ @@ -79,7 +79,7 @@ } } if(~ $#sec 0) { - sec=`{ls -pd $S/[0-9]* } + sec=`{ls -pd $S/[0-9]* $S/[1-9][0-9]*} } ix=$S/$sec/INDEX if(~ $#* 1) pat='^'^$1^' ' diff -r 9c68df83fb57 -r 416dd0cda909 sys/man/9/0intro --- a/sys/man/9/0intro Thu Oct 06 22:51:31 2011 +0200 +++ b/sys/man/9/0intro Sun Oct 09 19:13:12 2011 +0200 @@ -1,4 +1,4 @@ -.TH INTRO 10 +.TH INTRO 9 .SH NAME intro \- introduction to kernel functions .SH DESCRIPTION diff -r 9c68df83fb57 -r 416dd0cda909 sys/man/9/allocb --- a/sys/man/9/allocb Thu Oct 06 22:51:31 2011 +0200 +++ b/sys/man/9/allocb Sun Oct 09 19:13:12 2011 +0200 @@ -1,4 +1,4 @@ -.TH ALLOCB 10 +.TH ALLOCB 9 .SH NAME allocb, iallocb, freeb, freeblist, BLEN, blocklen, concatblock, copyblock, trimblock, packblock, padblock, pullblock, pullupblock, adjustblock, checkb \- data block management .SH SYNOPSIS @@ -97,13 +97,13 @@ are usually intended for a .B Queue (see -.IR qio (10)), +.IR qio (9)), but can be used independently. .PP A .B Block and its buffer are normally allocated by one call to -.IR malloc (10) +.IR malloc (9) and aligned on an 8 byte (\fLBY2V\fP) boundary. Some devices with particular allocation constraints (eg, requiring certain addresses for DMA) might allocate their own @@ -117,9 +117,9 @@ .B Block operations cannot be used in interrupt handlers because they either -.IR sleep (10) +.IR sleep (9) or raise an -.IR error (10). +.IR error (9). Of operations that allocate blocks, only .IR iallocb is usable. @@ -139,7 +139,7 @@ If it cannot allocate memory, .I allocb raises an -.IR error (10); +.IR error (9); it cannot be used by an interrupt handler. .PP .IR Iallocb @@ -279,10 +279,10 @@ the state of .IR b ; a -.IR panic (10) +.IR panic (9) results if things look grim. It is intended for internal use by the queue I/O routines (see -.IR qio (10)) +.IR qio (9)) but could be used elsewhere. .PP The only functions that can be called at interrupt level are @@ -297,7 +297,7 @@ The others allocate memory and can potentially block. .SH DIAGNOSTICS Many functions directly or indirectly can raise an -.IR error (10), +.IR error (9), and callers must therefore provide for proper error recovery as described therein to prevent memory leaks and other bugs. Except for @@ -309,4 +309,4 @@ .SH SOURCE .B /sys/src/9/port/allocb.c .SH SEE ALSO -.IR qio (10) +.IR qio (9) diff -r 9c68df83fb57 -r 416dd0cda909 sys/man/9/delay --- a/sys/man/9/delay Thu Oct 06 22:51:31 2011 +0200 +++ b/sys/man/9/delay Sun Oct 09 19:13:12 2011 +0200 @@ -1,4 +1,4 @@ -.TH DELAY 10 +.TH DELAY 9 .SH NAME delay, microdelay, addclock0link \- small delays, clock interrupts .SH SYNOPSIS @@ -25,16 +25,17 @@ For delays on the order of clock ticks, .I tsleep (see -.IR sleep (10)) +.IR sleep (9)) provides a better alternative to the busy waiting of these routines. .PP .I Addclock0link adds .I clockf -to a list of functions to be executed at each clock interrupt. +to a list of functions to be executed at each clock interrupt on +the first processor. .SH SOURCE .B /sys/src/9/port/portclock.c .br .B /sys/src/9/*/clock.c .SH SEE ALSO -.IR sleep (10) +.IR sleep (9) diff -r 9c68df83fb57 -r 416dd0cda909 sys/man/9/devattach --- a/sys/man/9/devattach Thu Oct 06 22:51:31 2011 +0200 +++ b/sys/man/9/devattach Sun Oct 09 19:13:12 2011 +0200 @@ -1,4 +1,4 @@ -.TH DEVATTACH 10 +.TH DEVATTACH 9 .SH NAME devattach, devclone, devdir, devgen, devwalk, devdirread, devstat, devopen, devbread, devbwrite, devcreate, devremove, devwstat, devreset, devinit, devshutdown, openmode \- common device driver support .SH SYNOPSIS @@ -117,7 +117,7 @@ It is normally called by a driver's .I attach function (see -.IR dev (10)). +.IR dev (9)). The .B qid for the new channel is @@ -132,7 +132,7 @@ returns a new channel that is a copy of .IR c . An attempt to clone an open channel causes a -.IR panic (10). +.IR panic (9). .PP The .L Dir @@ -182,7 +182,7 @@ .TP .B gid group name (set to -.IR eve (10)) +.IR eve (9)) .TP .B length length in bytes (set to zero, which @@ -489,7 +489,7 @@ bytes are needed, .I devstat raises the -.IR error (10) +.IR error (9) .BR Ebadarg . Otherwise, it returns the number of bytes in .I db @@ -528,7 +528,7 @@ These are converted to standard format (see .I convD2M in -.IR styx (10)) +.IR fcall (2)) and placed in the buffer .IR b . It returns the number of bytes in the result. @@ -591,14 +591,14 @@ if the open request was unsuccessful, .I devopen raises an appropriate -.IR error (10) +.IR error (9) and does not return. .PP .I Devbread returns a .B Block (see -.IR allocb (10)) +.IR allocb (9)) containing up to .I n bytes read, @@ -639,7 +639,7 @@ and .I devwstat are stubs that raise an -.IR error (10), +.IR error (9), .BR Eperm . They can be named directly in a device driver's device switch (the @@ -647,7 +647,7 @@ structure in .BR /sys/src/9/port/portdat.h : see -.IR dev (10)). +.IR dev (9)). .PP .IR Devreset , .I devinit @@ -686,7 +686,7 @@ within the kernel. .I Openmode raises an -.IR error (10) +.IR error (9) .B Ebadarg instead of returning, if .I o @@ -694,6 +694,6 @@ .SH SOURCE .B /sys/src/9/port/dev.c .SH SEE ALSO -.IR allocb (10), -.IR eve (10), -.IR qio (10) +.IR allocb (9), +.IR eve (9), +.IR qio (9) diff -r 9c68df83fb57 -r 416dd0cda909 sys/man/9/error --- a/sys/man/9/error Thu Oct 06 22:51:31 2011 +0200 +++ b/sys/man/9/error Sun Oct 09 19:13:12 2011 +0200 @@ -1,4 +1,4 @@ -.TH ERROR 10 +.TH ERROR 9 .SH NAME error, nexterror, poperror, waserror \- error handling functions .SH SYNOPSIS @@ -26,7 +26,8 @@ Each process has in its defining kernel .B Proc structure a stack of labels, -currently 32 elements deep. +.B NERR +(currently 64) elements deep. A kernel function that must perform a clean up or recovery action on an error makes a stylised call to .IR waserror , @@ -69,7 +70,7 @@ (there being nothing further on the stack), but calls .I pexit (see -.IR kproc (10)) +.IR kproc (9)) instead, to terminate the process. .PP @@ -164,4 +165,4 @@ and .IR "must not" . .SH SEE ALSO -.IR panic (10) +.IR panic (9) diff -r 9c68df83fb57 -r 416dd0cda909 sys/man/9/eve --- a/sys/man/9/eve Thu Oct 06 22:51:31 2011 +0200 +++ b/sys/man/9/eve Sun Oct 09 19:13:12 2011 +0200 @@ -1,4 +1,4 @@ -.TH EVE 10 +.TH EVE 9 .SH NAME eve, iseve \- privileged user .SH SYNOPSIS @@ -35,7 +35,7 @@ .B /dev/user file. The privileges are strictly local and do not extend into the network -(in particular, to file servers). +(in particular, to file servers—even ones running on the local machine). .SH SOURCE .B /sys/src/9/port/auth.c .SH SEE ALSO diff -r 9c68df83fb57 -r 416dd0cda909 sys/man/9/inb --- a/sys/man/9/inb Thu Oct 06 22:51:31 2011 +0200 +++ b/sys/man/9/inb Sun Oct 09 19:13:12 2011 +0200 @@ -80,4 +80,4 @@ .SH SOURCE .B /sys/src/9/pc/l.s .SH SEE ALSO -.IR dma (10) +.IR dma (9) diff -r 9c68df83fb57 -r 416dd0cda909 sys/man/9/intrenable --- a/sys/man/9/intrenable Thu Oct 06 22:51:31 2011 +0200 +++ b/sys/man/9/intrenable Sun Oct 09 19:13:12 2011 +0200 @@ -1,4 +1,4 @@ -.TH INTRENABLE 10 +.TH INTRENABLE 9 .SH NAME intrenable, intrdisable \- enable (disable) an interrupt handler .SH SYNOPSIS @@ -54,18 +54,18 @@ .I F is invoked by underlying code in the kernel that is invoked directly from the hardware vectors. It is therefore not running in any process (see -.IR kproc (10); +.IR kproc (9); indeed, on many platforms the current process pointer .RB ( up ) will be nil. There are many restrictions on kernel functions running outside a process, but a fundamental one is that they must not -.IR sleep (10), +.IR sleep (9), although they often call .B wakeup to signal the occurrence of an event associated with the interrupt. -.IR Qio (10) +.IR Qio (9) and other manual pages note which functions are safe for .I f to call. @@ -92,7 +92,7 @@ Device drivers that are not dynamically configured tend to call .I intrenable during reset or initialisation (see -.IR dev (10)), +.IR dev (9)), but can call it at any appropriate time, and instead of calling .I intrdisable @@ -100,7 +100,7 @@ .SH SOURCE .B /sys/src/9/*/trap.c .SH SEE ALSO -.IR malloc (10), -.IR qio (10), -.IR sleep (10), -.IR splhi (10) +.IR malloc (9), +.IR qio (9), +.IR sleep (9), +.IR splhi (9) diff -r 9c68df83fb57 -r 416dd0cda909 sys/man/9/kbdputc --- a/sys/man/9/kbdputc Thu Oct 06 22:51:31 2011 +0200 +++ b/sys/man/9/kbdputc Sun Oct 09 19:13:12 2011 +0200 @@ -1,4 +1,4 @@ -.TH KBDPUTC 10 +.TH KBDPUTC 9 .SH NAME kbdputc, kbdq \- keyboard interface to \fIcons\fP(3) .SH SYNOPSIS @@ -42,10 +42,11 @@ .IR utf (6)). It is up to the platform's keyboard driver to map a physical keyboard character, or a combination of them (for instance, following -.IR keyboard (6)) to a given Unicode character. +.IR keyboard (6)) +to a given Unicode character. .SH SOURCE .B /sys/src/9/*/kbd*.c .SH SEE ALSO .IR cons (3), .IR utf (6), -.IR qio (10) +.IR qio (9) diff -r 9c68df83fb57 -r 416dd0cda909 sys/man/9/kproc --- a/sys/man/9/kproc Thu Oct 06 22:51:31 2011 +0200 +++ b/sys/man/9/kproc Sun Oct 09 19:13:12 2011 +0200 @@ -1,4 +1,4 @@ -.TH KPROC 10 +.TH KPROC 9 .SH NAME kproc, pexit, postnote \- kernel process creation, termination and interrupt .SH SYNOPSIS @@ -24,13 +24,14 @@ .B text field of the .B Proc -structure of the new process; although the value is not visible to Limbo -applications, it can appear in system messages written to the console. +structure of the new process; this value is the name of the kproc in +the output of +.IR ps (1). The process is made runnable; it will run when selected by the scheduler -.IR sched (10). +.IR sched (9). The process is created with base and current priorities set to -.B PriKproc . +.BR PriKproc . It shares the kernel process group and thus name space. .PP A kernel process terminates only when it calls @@ -61,20 +62,20 @@ sends a software interrupt to process .IR p , causing it, if necessary, to wake from -.IR sleep (10) +.IR sleep (9) or break out of a .IR rendezvous (2), with an -.IR error (10) +.IR error (9) `interrupted'. Up to .B NNOTE notes can be pending at once (currently 5); if more than that arrive, the process is forced out of -.B sleep +.I sleep and -.BR rendezvous , +.IR rendezvous , but the message itself is discarded. .I Postnote returns non-zero iff the note has been @@ -113,7 +114,7 @@ .I kproc , that it should stop; the note will cause that process to raise an -.IR error (10). +.IR error (9). For example, a process started to read packets from a network device could be stopped as follows when the interface is unbound: .IP diff -r 9c68df83fb57 -r 416dd0cda909 sys/man/9/lib --- a/sys/man/9/lib Thu Oct 06 22:51:31 2011 +0200 +++ b/sys/man/9/lib Sun Oct 09 19:13:12 2011 +0200 @@ -1,4 +1,4 @@ -.TH LIB 10 +.TH LIB 9 .SH NAME lib \- C library functions used by the kernel .SH SYNOPSIS @@ -57,7 +57,7 @@ and .I tokenize (see also -.IR parsecmd (10)) +.IR parsecmd (9)) .TP .IR quote (2) .br diff -r 9c68df83fb57 -r 416dd0cda909 sys/man/9/lock --- a/sys/man/9/lock Thu Oct 06 22:51:31 2011 +0200 +++ b/sys/man/9/lock Sun Oct 09 19:13:12 2011 +0200 @@ -1,4 +1,4 @@ -.TH LOCK 10 +.TH LOCK 9 .SH NAME lock, canlock, ilock, iunlock, unlock \- spin locks .SH SYNOPSIS @@ -22,10 +22,10 @@ resources using spin locks. They in turn are used to build higher-level synchronisation mechanisms such as those described in -.IR sleep (10), -.IR qlock (10) +.IR sleep (9), +.IR qlock (9) and -.IR qio (10). +.IR qio (9). They should be used only to protect short critical sections that update shared data structures. .PP @@ -36,7 +36,7 @@ .I Lock should not be used to lock a structure shared with an interrupt handler unless interrupts are disabled by -.IR splhi (10) +.IR splhi (9) before attempting the lock; it is better to use .IR ilock , @@ -74,7 +74,7 @@ .I Ilock never reschedules the caller, nor must a caller allow itself to be rescheduled (eg, by calling -.IR sleep (10)) +.IR sleep (9)) before releasing the lock. .PP .I Iunlock @@ -103,4 +103,4 @@ .br .B /sys/src/9/*/l.s .SH SEE ALSO -.IR qlock (10) +.IR qlock (9) diff -r 9c68df83fb57 -r 416dd0cda909 sys/man/9/malloc --- a/sys/man/9/malloc Thu Oct 06 22:51:31 2011 +0200 +++ b/sys/man/9/malloc Sun Oct 09 19:13:12 2011 +0200 @@ -1,4 +1,4 @@ -.TH MALLOC 10 +.TH MALLOC 9 .SH NAME malloc, mallocz, smalloc, realloc, calloc, free, msize, setmalloctag, setrealloctag, getmalloctag, getrealloctag, malloctopoolblock \- kernel memory allocator .SH SYNOPSIS @@ -52,11 +52,11 @@ the allocator .IR pool (2), which in turn replenishes the pool as required by calling -.IR xalloc (10). +.IR xalloc (9). All but .I smalloc (which calls -.IR sleep (10)) +.IR sleep (9)) may safely be called by interrupt handlers. .PP .I Malloc @@ -190,4 +190,4 @@ .B /sys/src/9/port/alloc.c .SH SEE ALSO .IR pool (2), -.IR xalloc (10) +.IR xalloc (9) diff -r 9c68df83fb57 -r 416dd0cda909 sys/man/9/newchan --- a/sys/man/9/newchan Thu Oct 06 22:51:31 2011 +0200 +++ b/sys/man/9/newchan Sun Oct 09 19:13:12 2011 +0200 @@ -1,4 +1,4 @@ -.TH NEWCHAN 10 +.TH NEWCHAN 9 .SH NAME newchan, chanfree, cclose, eqqid, eqchan, isdir, fdtochan, namec \- channel operations .SH SYNOPSIS @@ -54,7 +54,7 @@ .IR devclone , when an existing channel is cloned; see -.IR devattach (10). +.IR devattach (9). .PP .I Chanfree frees the channel structure @@ -106,7 +106,7 @@ is a directory. If so, it returns; otherwise, it generates an -.IR error (10), +.IR error (9), .BR Enotdir . .PP The @@ -156,7 +156,7 @@ is non-zero, the channel's reference count has been incremented. .I Fdtochan calls -.IR error (10) +.IR error (9) if it detects invalid uses, in particular an invalid file descriptor .IR fd . .PP @@ -217,9 +217,9 @@ .IR c . .SH DIAGNOSTICS Most functions call -.IR error (10) +.IR error (9) on any sort of error. .SH SOURCE .B /sys/src/9/port/chan.c .SH SEE ALSO -.IR ref (10) +.IR ref (9) diff -r 9c68df83fb57 -r 416dd0cda909 sys/man/9/panic --- a/sys/man/9/panic Thu Oct 06 22:51:31 2011 +0200 +++ b/sys/man/9/panic Sun Oct 09 19:13:12 2011 +0200 @@ -1,4 +1,4 @@ -.TH PANIC 10 +.TH PANIC 9 .SH NAME panic \- abandon hope .SH SYNOPSIS @@ -18,7 +18,7 @@ The format .I fmt and associated arguments are the same as those for -.IR print (10). +.IR print (9). .I Panic adds a prefix .L "panic: " diff -r 9c68df83fb57 -r 416dd0cda909 sys/man/9/parsecmd --- a/sys/man/9/parsecmd Thu Oct 06 22:51:31 2011 +0200 +++ b/sys/man/9/parsecmd Sun Oct 09 19:13:12 2011 +0200 @@ -1,10 +1,16 @@ -.TH PARSECMD 10 +.TH PARSECMD 9 .SH NAME -parsecmd \- parse device commands +parsecmd, cmderror, lookupcmd \- parse device commands .SH SYNOPSIS .ta \w'\fLCmdbuf* 'u .B Cmdbuf* parsecmd(char *a, int n) +.PP +.B +void cmderror(Cmdbuf *cb, char *s) +.PP +.B +Cmdtab* lookupcmd(Cmdbuf *cb, Cmdtab *ctab, int nctab) .SH DESCRIPTION .I Parsecmd is an interface to @@ -59,9 +65,44 @@ is allocated by .I smalloc (see -.IR malloc (10)), +.IR malloc (9)), and the caller is responsible for freeing it using .IR free . +.I Cmderror +prepends the given format with the original command, +then calls +.IR error (9). +.PP +Command strings may be turned into a (typically enumerated) +integer with +.IR lookupcmd . +The catchall +.L * +matches any text. Unrecognized commands, or commands +given an unacceptable number of arguments generate a +call to +.IR error . +The definition is as follows +.IP +.EX +.ta 6n +\w'char* 'u +struct Cmdtab +{ + int index; + char *cmd; + int narg; +}; +.EE +.PP +The integer +.B index +is the number returned on command match. +The string +.B cmd +is the command name, and +.B narg +is 0 (indicating a varadic function) or the +number of arguments. .SH SOURCE .B /sys/src/9/port/parse.c .br diff -r 9c68df83fb57 -r 416dd0cda909 sys/man/9/qio --- a/sys/man/9/qio Thu Oct 06 22:51:31 2011 +0200 +++ b/sys/man/9/qio Sun Oct 09 19:13:12 2011 +0200 @@ -1,4 +1,4 @@ -.TH QIO 10 +.TH QIO 9 .SH NAME qio: qget, qdiscard, qconsume, qpass, qproduce, qcopy, qopen, qbread, qread, qbwrite, qwrite, qiwrite, qfree, qclose, qhangup, qreopen, qlen, qwindow, qcanread, qsetlimit, qnoblock, qflush, qfull \- queued I/O for devices .SH SYNOPSIS @@ -81,7 +81,7 @@ structure as a sequence of variable-sized .BR Blocks ; see -.IR allocb (10). +.IR allocb (9). .PP .I Qopen initialises and returns a pointer to a new @@ -118,7 +118,7 @@ .RB ( Ehungup by default). Subsequent attempts to write to the queue raise an -.IR error (10). +.IR error (9). .I Qhangup does not flush the queue: subsequent read requests are handled normally until the queue empties. @@ -126,7 +126,7 @@ and the other functions then return their conventional values for a hungup stream: 0, -1 or a null pointer, depending on the function. After a few such attempts by any process, an -.IR error (10) +.IR error (9) is raised (typically .BR Ehungup ) on each subsequent read. @@ -198,7 +198,7 @@ must not block. .PP Interrupt handlers must not -.IR sleep (10), +.IR sleep (9), and are therefore restricted to using only the non-blocking functions described below. .SS "Stream mode and message mode" In stream mode, @@ -264,7 +264,7 @@ normally returns .IR len , but raises an -.IR error (10) +.IR error (9) if the queue is closed (see .I qhangup and @@ -476,5 +476,5 @@ .SH SOURCE .B /sys/src/9/port/qio.c .SH SEE ALSO -.IR allocb (10), -.IR ref (10) +.IR allocb (9), +.IR ref (9) diff -r 9c68df83fb57 -r 416dd0cda909 sys/man/9/qlock --- a/sys/man/9/qlock Thu Oct 06 22:51:31 2011 +0200 +++ b/sys/man/9/qlock Sun Oct 09 19:13:12 2011 +0200 @@ -1,4 +1,4 @@ -.TH QLOCK 10 +.TH QLOCK 9 .SH NAME qlock, qunlock, canqlock, rlock, runlock, wlock, wunlock \- serial synchronisation .SH SYNOPSIS @@ -28,10 +28,10 @@ void wunlock(RWlock *l) .SH DESCRIPTION The primitive locking functions described in -.IR lock (10) +.IR lock (9) guarantee mutual exclusion, but they implement spin locks, and should not be used if the process might -.IR sleep (10) +.IR sleep (9) within a critical section. The following functions serialise access to a resource by forming an orderly queue of processes. @@ -101,5 +101,5 @@ .B /sys/src/9/port/qlock.c .br .SH SEE ALSO -.IR lock (10), -.IR splhi (10) +.IR lock (9), +.IR splhi (9) diff -r 9c68df83fb57 -r 416dd0cda909 sys/man/9/readnum --- a/sys/man/9/readnum Thu Oct 06 22:51:31 2011 +0200 +++ b/sys/man/9/readnum Sun Oct 09 19:13:12 2011 +0200 @@ -1,4 +1,4 @@ -.TH READNUM 10 +.TH READNUM 9 .SH NAME readnum, readstr \- return values from read from device .SH SYNOPSIS diff -r 9c68df83fb57 -r 416dd0cda909 sys/man/9/ref --- a/sys/man/9/ref Thu Oct 06 22:51:31 2011 +0200 +++ b/sys/man/9/ref Sun Oct 09 19:13:12 2011 +0200 @@ -1,4 +1,4 @@ -.TH REF 10 +.TH REF 9 .SH NAME Ref, incref, decref \- reference counts .SH SYNOPSIS @@ -29,7 +29,7 @@ .B Lock prevents concurrent updates (see -.IR lock (10)). +.IR lock (9)). .PP .I Incref atomically increments the reference count @@ -52,7 +52,7 @@ .SH DIAGNOSTICS .I Decref will -.IR panic (10) +.IR panic (9) if the count goes negative, revealing a reference counting bug. .SH SOURCE diff -r 9c68df83fb57 -r 416dd0cda909 sys/man/9/seconds --- a/sys/man/9/seconds Thu Oct 06 22:51:31 2011 +0200 +++ b/sys/man/9/seconds Sun Oct 09 19:13:12 2011 +0200 @@ -1,4 +1,4 @@ -.TH SECONDS 10 +.TH SECONDS 9 .SH NAME seconds, ticks, fastticks, HZ, MS2HZ, MS2TK, TK2MS, TK2SEC \- kernel times and time conversions .SH SYNOPSIS diff -r 9c68df83fb57 -r 416dd0cda909 sys/man/9/sleep --- a/sys/man/9/sleep Thu Oct 06 22:51:31 2011 +0200 +++ b/sys/man/9/sleep Sun Oct 09 19:13:12 2011 +0200 @@ -1,4 +1,4 @@ -.TH SLEEP 10 +.TH SLEEP 9 .SH NAME sleep, wakeup, tsleep, return0 \- process synchronisation .SH SYNOPSIS @@ -21,7 +21,7 @@ In particular, they are used by device drivers to wait for an event to be signalled on receipt of an interrupt. (In practice, they are most often used indirectly, through -.IR qio (10) +.IR qio (9) for instance.) .PP The caller of @@ -98,25 +98,25 @@ can be interrupted by .IR swiproc (see -.IR kproc (10)), +.IR kproc (9)), causing a non-local goto through a call to -.IR error (10). +.IR error (9). .SH DIAGNOSTICS There can be at most one process waiting on a .BR Rendez , and if two processes collide, the system will -.IR panic (10) +.IR panic (9) .RB (`` "double sleep" ''). Access to a .B Rendez must therefore be serialised by some other mechanism, usually -.IR qlock (10). +.IR qlock (9). .SH SOURCE .B /sys/src/9/port/proc.c .SH SEE ALSO -.IR lock (10), -.IR qlock (10), -.IR delay (10) +.IR lock (9), +.IR qlock (9), +.IR delay (9) .br ``Process Sleep and Wakeup on a Shared-memory Multiprocessor'', in diff -r 9c68df83fb57 -r 416dd0cda909 sys/man/9/splhi --- a/sys/man/9/splhi Thu Oct 06 22:51:31 2011 +0200 +++ b/sys/man/9/splhi Sun Oct 09 19:13:12 2011 +0200 @@ -1,4 +1,4 @@ -.TH SPLHI 10 +.TH SPLHI 9 .SH NAME splhi, spllo, splx, islo \- enable and disable interrupts .SH SYNOPSIS @@ -20,10 +20,10 @@ Generally, device drivers should use .I ilock (see -.IR lock (10)), -.IR sleep (10), +.IR lock (9)), +.IR sleep (9), or the functions in -.IR qio (10) +.IR qio (9) to control interaction between processes and interrupt handlers. Those routines (but not these) provide correct synchronisation on multiprocessors. .PP @@ -51,7 +51,7 @@ .SH SOURCE .B /sys/src/9/*/l.s .SH SEE ALSO -.IR lock (10), -.IR qio (10), -.IR sleep (10), -.IR intrenable (10) +.IR lock (9), +.IR qio (9), +.IR sleep (9), +.IR intrenable (9) diff -r 9c68df83fb57 -r 416dd0cda909 sys/man/9/xalloc --- a/sys/man/9/xalloc Thu Oct 06 22:51:31 2011 +0200 +++ b/sys/man/9/xalloc Sun Oct 09 19:13:12 2011 +0200 @@ -1,4 +1,4 @@ -.TH XALLOC 10 +.TH XALLOC 9 .SH NAME xalloc, xspanalloc, xfree \- basic memory management .SH SYNOPSIS @@ -17,7 +17,7 @@ .I xfree are primitives used by higher-level memory allocators in the kernel, such as -.IR malloc (10). +.IR malloc (9). They are not intended for use directly by most kernel routines. The main exceptions are routines that permanently allocate large structures, or need the special alignment properties guaranteed by @@ -46,7 +46,7 @@ If .I xspanalloc cannot allocate memory to satisfy the given constraints, it will -.IR panic (10). +.IR panic (9). The technique it uses can sometimes cause memory to be wasted. Consequently, .I xspanalloc @@ -69,4 +69,4 @@ .SH SOURCE .B /sys/src/9/port/xalloc.c .SH SEE ALSO -.IR malloc (10) +.IR malloc (9) diff -r 9c68df83fb57 -r 416dd0cda909 sys/man/mkfile --- a/sys/man/mkfile Thu Oct 06 22:51:31 2011 +0200 +++ b/sys/man/mkfile Sun Oct 09 19:13:12 2011 +0200 @@ -5,7 +5,7 @@ default:V: check indices:V: - for (i in [0-8]){ + for (i in [0-9] [1-9][0-9]){ $LIB/secindex $i > $i/INDEX $LIB/mkhtmlindex $i > $i/INDEX.html } @@ -18,7 +18,7 @@ echo .am TH echo .tm '\\$1' '\\$2' '\\n%' echo .. - for (i in [0-8]){ + for (i in [1-9][0-9]){ builtin cd $i for(j in [a-z0-9]*) switch($i/$j){ @@ -41,18 +41,18 @@ mk out > /dev/null >[2] /dev/null old-check:V: checksource - awk -f $LIB/checkman.awk [0-8]/* | sed '/\/(cda|av|midi|pub|weather|service\.9net|isdn)(\/|\))/d' + awk -f $LIB/checkman.awk [0-9]/* [1-9][0-9]/* | sed '/\/(cda|av|midi|pub|weather|service\.9net|isdn)(\/|\))/d' punccheck: - grep -n '^\.[IB][^PRIB].+[.;,:]$' [0-9]/* | grep -v '\.\.\.' + grep -n '^\.[IB][^PRIB].+[.;,:]$' [0-9]/* [1-9][0-9]/* | grep -v '\.\.\.' check:V: indices checksource - awk -f $LIB/checkman.awk [0-8]/* + awk -f $LIB/checkman.awk [0-9]/* [1-9][0-9]/* checksource:QV: sam -d >[2]/dev/null <<'!' f input - < cat [0-8]/[0-9a-z]* + < cat [0-9]/[0-9a-z]* [1-9][0-9]/* B output b input ,x/^\.SH SOURCE/ .,/^\.SH/ x g/^\.B/t "output @@ -80,7 +80,7 @@ {echo -n $FONTS; cat $LIB/preface} | troff -ms {echo -n $FONTS; echo ' '} | troff { - for (i in [0-8]){ + for (i in [0-9] [1-9][0-9]){ builtin cd $i for(j in [a-z0-9]*) switch($i/$j){