66 lines · 1.3 KB · Text
RawDownload
.TH 9PQUEUE 2.SH NAMEReqqueue,reqqueuecreate,reqqueuepush,reqqueueflush \- deferred processing of 9P requests.SH SYNOPSIS.ft L.nf#include <u.h>#include <libc.h>#include <fcall.h>#include <thread.h>#include <9p.h>.fi.PP.ft L.nf.ta \w'\fLFile 'ustruct Reqqueue{	\fI...\fP};.fi.PP.ft L.nf.ta \w'\fLReaddir* 'u +4n +4nReqqueue*	reqqueuecreate(void);void		reqqueuepush(Reqqueue *q, Req *r, void (*f)(Req *));void		reqqueueflush(Reqqueue *q, Req *r);void		reqqueuefree(Reqqueue *q);.fi.SH DESCRIPTION.I Reqqueueprovides routines for deferred processing of 9p request inmultithreaded 9p servers..PPThe.I reqqueuecreatefunction spawns a process for handling requests returninga pointer to the.I Reqqueuestructure allocated..PPTo schedule a request to be processed on a queue,.I reqqueuepushis called with request.I rand its handler function.IR f ..PPA previously submitted request can be flushed from a queueby.I reqqueueflushwhich will remove the request immediately if processing hasnot started. If processing has been started, the processwill be interrupted..PP.I Reqqueuefreefrees a queue.No new requests should be sent to the queue and it will be freed once all requests in it have been processed..SH SOURCE.B /sys/src/lib9p/queue.c.SH SEE ALSO.IR 9p (2)