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

This commit is contained in:
cinap_lenrek 2011-08-26 06:24:42 +02:00
parent d247218116
commit 49c122665f
4 changed files with 35 additions and 5 deletions

View file

@ -196,7 +196,6 @@ dd -conv swab | games/mp3enc -a -r -m m --resample 16 -b 24
.IR mp3dec (1),
.IR audio (3),
.IR cdfs (4),
.IR audio (7),
.IR juke (7),
.IR playlistfs (7)
.br

View file

@ -63,7 +63,9 @@ typedef struct Srv {
.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 @@ void walkandclone(Req *r, char *(*walk1)(Fid *old, char *name, void *v),
.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 @@ this process, the entire process is terminated by calling
(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 @@ If it is expected that some requests might
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 @@ or is maintained elsewhere.
.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

View file

@ -365,5 +365,4 @@ Default mount point for the music database.
.SH SOURCE
.B /sys/src/games/music
.SH SEE ALSO
.IR playlistfs (7),
.IR audio (7)
.IR playlistfs (7).

View file

@ -152,5 +152,4 @@ Volume control file
.SH SOURCE
.B /sys/src/games/music/playlistfs
.SH SEE ALSO
.IR juke (7),
.IR audio (7)
.IR juke (7).