git: 9front

Download patch

ref: 6397e5da46bd3d142ae103251118d28b9c85ba56
parent: 38c14a17f6d77b4a2523f8d897947e59d23eb1fa
author: cinap_lenrek <cinap_lenrek@localhost>
date: Fri Aug 26 02:24:42 EDT 2011

9p(2): document postsharesrv and srvrelease/srvacquire

--- a/sys/man/1/mp3enc
+++ b/sys/man/1/mp3enc
@@ -196,7 +196,6 @@
 .IR mp3dec (1),
 .IR audio (3),
 .IR cdfs (4),
-.IR audio (7),
 .IR juke (7),
 .IR playlistfs (7)
 .br
--- a/sys/man/2/9p
+++ b/sys/man/2/9p
@@ -63,7 +63,9 @@
 .ta \w'\fLvoid* 'u
 int	srv(Srv *s)
 void	postmountsrv(Srv *s, char *name, char *mtpt, int flag)
+void	postsharesrv(Srv *s, char *name, char *mtpt, char *desc)
 void	threadpostmountsrv(Srv *s, char *name, char *mtpt, int flag)
+void	threadpostsharesrv(Srv *s, char *name, char *mtpt, char *desc)
 void	listensrv(Srv *s, char *addr)
 void	threadlistensrv(Srv *s, char *addr)
 int	postfd(char *srvname, int fd)
@@ -80,6 +82,15 @@
 .nf
 .ft L
 .ta \w'\fLvoid* 'u
+void	srvrelease(Srv *s)
+void	srvacquire(Srv *s)
+.fi
+.PP
+.fi
+.PP
+.nf
+.ft L
+.ta \w'\fLvoid* 'u
 void*	emalloc9p(ulong n)
 void*	erealloc9p(void *v, ulong n)
 char*	estrdup9p(char *s)
@@ -224,6 +235,18 @@
 (see
 .IR perror (2)).
 .PP
+.I Postsharesrv
+is similar to
+.I Postmountsrv
+but instead of mounting the service on a directory, it is
+put in a share (see
+.IR shr (3))
+where
+.IB mtpt
+is the name of the share and
+.IB desc
+is the name of the service channel.
+.PP
 .I Listensrv
 and
 .I threadlistensrv
@@ -334,6 +357,15 @@
 block, arranging for alternate processes
 to handle them is suggested.
 .PP
+.I Srvrelease
+detaches the calling process from the server loop and
+if neccesary spawns a new process to handle 9p requests.
+When released, the process is free to do blocking work
+or even exit because it now running in parallel to the
+server loop.
+.I Srvacquire
+joins the calling (released) process with the server loop.
+.PP
 The constraints on the service functions are as follows.
 These constraints are checked while the server executes.
 If a service function fails to do something it ought to have,
@@ -781,6 +813,7 @@
 .IR 9pfid (2),
 .IR 9pfile (2),
 .IR srv (3),
+.IR shr (3),
 .IR intro (5)
 .SH BUGS
 The switch to 9P2000 was taken as an opportunity to tidy
--- a/sys/man/7/juke
+++ b/sys/man/7/juke
@@ -365,5 +365,4 @@
 .SH SOURCE
 .B /sys/src/games/music
 .SH SEE ALSO
-.IR playlistfs (7),
-.IR audio (7)
+.IR playlistfs (7).
--- a/sys/man/7/playlistfs
+++ b/sys/man/7/playlistfs
@@ -152,5 +152,4 @@
 .SH SOURCE
 .B /sys/src/games/music/playlistfs
 .SH SEE ALSO
-.IR juke (7),
-.IR audio (7)
+.IR juke (7).
--