]> git.lizzy.rs Git - plan9front.git/blobdiff - sys/man/2/9p
vt: implement proper selections (thanks Ori_B)
[plan9front.git] / sys / man / 2 / 9p
index 32e2f9173971221da5f94c27e0f8b164257655d3..3a42b4cfd7afb7a3024886ce6b28ff986f62af38 100644 (file)
@@ -8,12 +8,16 @@ estrdup9p,
 listensrv,
 postfd,
 postmountsrv,
+postsharesrv,
 readbuf,
 readstr,
 respond,
 responderror,
+srvacquire,
+srvrelease,
 threadlistensrv,
 threadpostmountsrv,
+threadpostsharesrv,
 srv \- 9P file service
 .SH SYNOPSIS
 .ft L
@@ -48,6 +52,7 @@ typedef struct Srv {
 
        void            (*destroyfid)(Fid *fid);
        void            (*destroyreq)(Req *r);
+       void            (*start)(Srv *s);
        void            (*end)(Srv *s);
        void*   aux;
 
@@ -202,7 +207,7 @@ or
 .IR thread (2)),
 using the
 .BR RFFDG ,
-.RR RFNOTEG ,
+.BR RFNOTEG ,
 .BR RFNAMEG ,
 and
 .BR RFMEM
@@ -355,16 +360,17 @@ and
 is single-threaded.
 If it is expected that some requests might
 block, arranging for alternate processes
-to handle them is suggested.
+to handle them is suggested (see
+.IR 9pqueue (2)).
 .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.
+temporarily releases the calling process from the server
+loop and if neccesary spawns a new process to handle 9p 
+requests. When released, the process can do blocking work
+that would otherwise halt processing of 9p requests.
 .I Srvacquire
-joins the calling (released) process with the server loop.
+rejoins the calling process with the server loop after
+a srvrelease.
 .PP
 The constraints on the service functions are as follows.
 These constraints are checked while the server executes.
@@ -717,6 +723,7 @@ has been sent.
 .PP
 .IR Destroyfid ,
 .IR destroyreq ,
+.IR start ,
 and
 .I end
 are auxiliary functions, not called in direct response to 9P requests.
@@ -747,6 +754,10 @@ is called to allow the program to dispose of the
 .IB r -> aux
 pointer.
 .TP
+.I Start
+This gets called (from the forked service process) 
+prior entering the 9P service loop.
+.TP
 .I End
 Once the 9P service loop has finished
 (end of file been reached on the service pipe
@@ -787,12 +798,6 @@ option to increment
 and
 .B /sys/src/lib9p/ramfs.c
 are good examples of simple single-threaded file servers.
-.IR Webfs (4)
-and
-.I sshnet
-(see
-.IR ssh (1))
-are good examples of multithreaded file servers.
 .PP
 In general, the
 .B File
@@ -812,6 +817,7 @@ or is maintained elsewhere.
 .SH SEE ALSO
 .IR 9pfid (2),
 .IR 9pfile (2),
+.IR 9pqueue (2),
 .IR srv (3),
 .IR shr (3),
 .IR intro (5)