diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2014-07-03 00:47:10 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2014-07-03 00:47:10 +0200 |
commit | fa56753ed842ae5416ecbb7e75e39ec85a36c68c (patch) | |
tree | 9dbc90d21fc5f99401a8705a19d6593945a0cf13 /sys | |
parent | 51cb8f50d82b3d22f5c8e42029e5fc3162c7acd8 (diff) |
add 9pqueue(2), medium to low quality manpage.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/man/2/9pqueue | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/sys/man/2/9pqueue b/sys/man/2/9pqueue new file mode 100644 index 000000000..5cf6bb269 --- /dev/null +++ b/sys/man/2/9pqueue @@ -0,0 +1,61 @@ +.TH 9PQUEUE 2 +.SH NAME +Reqqueue, +reqqueuecreate, +reqqueuepush, +reqqueueflush \- defered 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 'u +struct Reqqueue +{ + \fI...\fP +}; +.fi +.PP +.ft L +.nf +.ta \w'\fLReaddir* 'u +4n +4n +Reqqueue* reqqueuecreate(void); +void reqqueuepush(Reqqueue *q, Req *r, void (*f)(Req *)); +void reqqueueflush(Reqqueue *q, Req *r); +.fi +.SH DESCRIPTION +.I Reqqueue +provides routines for defered processing of 9p request in +multithreaded 9p servers. +.PP +The +.I reqqueuecreate +function spawns a process for handling requests returning +a pointer to the +.I Reqqueue +structure allocated. +.PP +To schedule a request to be processed on a queue, +.I reqqueuepush +is called with request +.I r +and its handler function +.IR f . +.PP +A previously submited request can be flushed from a queue +by +.I reqqueueflush +which will reply the request immidiately when processing has +not started. If processing has been started, the process +will be interrupted. +.SH SOURCE +.B /sys/src/lib9p/queue.c +.SH SEE ALSO +.IR 9p (2) |