lib9p: add Srv.start
This commit is contained in:
parent
d9f65faf71
commit
9c844d90e1
3 changed files with 10 additions and 0 deletions
|
@ -195,6 +195,7 @@ struct Srv {
|
|||
Tree* tree;
|
||||
void (*destroyfid)(Fid*);
|
||||
void (*destroyreq)(Req*);
|
||||
void (*start)(Srv*);
|
||||
void (*end)(Srv*);
|
||||
void* aux;
|
||||
|
||||
|
|
|
@ -52,6 +52,7 @@ typedef struct Srv {
|
|||
|
||||
void (*destroyfid)(Fid *fid);
|
||||
void (*destroyreq)(Req *r);
|
||||
void (*start)(Srv *s);
|
||||
void (*end)(Srv *s);
|
||||
void* aux;
|
||||
|
||||
|
@ -721,6 +722,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.
|
||||
|
@ -751,6 +753,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
|
||||
|
|
|
@ -765,6 +765,9 @@ srv(Srv *srv)
|
|||
srv->fpool->srv = srv;
|
||||
srv->rpool->srv = srv;
|
||||
|
||||
if(srv->start)
|
||||
srv->start(srv);
|
||||
|
||||
srvwork(srv);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue