summaryrefslogtreecommitdiff
path: root/sys/include/9p.h
AgeCommit message (Collapse)Author
2021-05-01lib9p: remove Srv.srvfd, make postsrv() and threadpostsrv() return the ↵cinap_lenrek
mountable file descriptor, update documentation Now that we have these new functions, we can also make them return an error instead of calling sysfatal() like postmountsrv(). Remove the confusing Srv.srvfd, as it is only temporarily used and return it from postsrv() instead.
2021-05-01lib9p: expose Srv.forker handler and srvforker(), threadsrvforker() and ↵cinap_lenrek
threadsrv() functions To use srvrease()/srvaquire() we need to have a way to spawn new processes to handle the service loop. This functionality was provided by the internal _forker() function which was eigther rfork or libthread based implementation depending on if postmountsrv() or threadpostmountsrv() where called. For servers who want to use srv() directly, _forker would not be initialized so srvrelease() could not be used. To untangle this, we get rid of the global _forker handler and put the handler in the Srv structure. Which will get initialized (when nil) to eigther srvforker() or threadsrvforker() depending on if the thread or non-thread entry points where used. For symmetry, we provde new threadsrv() and threadpostsrv() functions which handle the default initialization of Srv.forker. This also allows a user to provide his own forker function, maybe to conserve stack space. To avoid dead code, we put each of these function in their own object file. Note, this also allows a user to define its own srvforker() symbol.
2020-03-29lib9p: fix re-use of root Qid when using createfile(); remove unused dirqidgenBurnZeZ
2020-03-08lib9p: implement automatic remove-on-close cleanup in postsharesrv(), remove ↵cinap_lenrek
postfd() and sharefd() functions with the latest changes to shr(3), we can use ORCLOSE on the control file to get the mount in the share automatically removed when the server exits or something goes wrong during postsharesrv(). do not expose postfd() and sharefd() functions. they where undocumented and leak the control file descriptors.
2020-03-07lib9p: get rid of Srv.nopipe and Srv.leavefdsopen hackscinap_lenrek
it is unclear how Srv.nopipe flag should work inside postmountserv(). if a server wants to serve on stdio descriptors, he can just call srv() after initializing Srv.infd and Srv.outfd. The Srv.leavefdsopen hack can be removed now that acme win has been fixed.
2017-04-30lib9p: allow rewinding in 9pfile directoriescinap_lenrek
2016-10-23lib9p: limit the number of srv processes kept arround 8cinap_lenrek
2015-10-15mergecinap_lenrek
2015-10-15lib9p: do not override Srv.end in listensrv(), simplify srvclose() and ↵cinap_lenrek
recounting listensrv() used to override Srv.end() with its own handler to free the malloc'd Srv structure and close the fd. this makes it impossible to register your own cleanup handler. instead, we introduce the private Srv.free() handler that is used by listensrv to register its cleanup code. Srv.free() is called once all the srv procs have been exited and all requests on that srv have been responded to while Srv.end() is called once all the procs exited the srv loop regardless of the requests still being in flight.
2015-10-12lib9p: add reqqueuefreeaiju
2013-01-30lib9p: defer closing down srv until the last request has been responded, ↵cinap_lenrek
Tversion message size in multithreaded programs, we have to wait until all outstanding requests have been responded before closing down the srv. dont make write errors sysfatal(), only print them. in case if listensrv() is used we dont want to exit the process in respond() called by some worker thread. make sure Tversion is only handled when there are no outstanding requests and make sure message size is sane.
2012-03-30lib9p: add Srv.startcinap_lenrek
2011-08-20added interrupt proc ctl messageaiju
2011-08-19lib9p reqqueue: more cleaningaiju
2011-08-19lib9p reqqueue: remove setjmp shitaiju
2011-08-19lib9p: add srvacquire/srvreleasecinap_lenrek
2011-08-16lib9p: added toilet queuesaiju
2011-07-30devshr: changed #σc to contain directoriesaiju
nusb: detaching
2011-07-27lib9p: added threadpostsharesrvaiju
2011-07-27lib9p: added functions for devshraiju
2011-03-30Import sources from 2011-03-30 iso image - libTaru Karttunen
2011-03-30Import sources from 2011-03-30 iso image - sys/includeTaru Karttunen