URI: 
       tjust what we need - more rpcs - plan9port - [fork] Plan 9 from user space
  HTML git clone git://src.adamsgaard.dk/plan9port
   DIR Log
   DIR Files
   DIR Refs
   DIR README
   DIR LICENSE
       ---
   DIR commit 57a2289bc9a9427e12a5e8101591ae8f49fc87bc
   DIR parent fdcd298270b54de80852cce7668357107bc0ddb9
  HTML Author: rsc <devnull@localhost>
       Date:   Sun, 25 Jun 2006 21:23:39 +0000
       
       just what we need - more rpcs
       
       Diffstat:
         A man/man1/devdraw.1                  |      21 +++++++++++++++++++++
         A man/man3/drawfcall.3                |      53 ++++++++++++++++++++++++++++++
         M man/man3/event.3                    |       5 -----
         M man/man3/memdraw.3                  |       6 +-----
         M man/man3/memlayer.3                 |       6 +-----
         M man/man3/mux.3                      |      36 ++++++++++++++++++++++++++++++-
       
       6 files changed, 111 insertions(+), 16 deletions(-)
       ---
   DIR diff --git a/man/man1/devdraw.1 b/man/man1/devdraw.1
       t@@ -0,0 +1,21 @@
       +.TH DEVDRAW 1
       +.SH NAME
       +devdraw \- draw device simulator
       +.SH SYNOPSIS
       +invoked via 
       +.I initdraw
       +(see
       +.IR graphics (3))
       +.SH DESCRIPTION
       +.I Devdraw
       +XXX
       +.SH SOURCE
       +.B \*9/src/cmd/devdraw
       +.SH "SEE ALSO
       +.IR draw (3),
       +.IR drawfcall (3),
       +.IR graphics (3)
       +.SH BUGS
       +.I Devdraw
       +should probably present a standard 9P server
       +instead of using its own protocol.
   DIR diff --git a/man/man3/drawfcall.3 b/man/man3/drawfcall.3
       t@@ -0,0 +1,53 @@
       +.TH DRAWFCALL
       +.SH NAME
       +convM2W, convW2M, drawfcallfmt, readwsysmsg, sizeW2M \- window system protocol
       +.SH SYNOPSIS
       +.nf
       +.PP
       +.ft L
       +#include <u.h>
       +#include <libc.h>
       +#include <draw.h>
       +#include <mouse.h>
       +#include <cursor.h>
       +#include <drawfcall.h>
       +.ft P
       +.ta \w'\fLuint 'u
       +.PP
       +.B
       +uint        convM2W(uchar *ap, uint nap, Wsysmsg *w)
       +.PP
       +.B
       +uint        convW2M(Wsysmsg *w, uchar *ap, uint nap)
       +.PP
       +.B
       +int        drawfcallfmt(Fmt*)
       +.PP
       +.B
       +int        readwsysmsg(int fd, uchar *buf, uint nbuf)
       +.PP
       +.B
       +uint        sizeW2M(Wsysmsg *w)
       +.SH DESCRIPTION
       +These routines are analogues of the routines described in 
       +.IR fcall (3).
       +They manipulate graphics device protocol messages
       +rather than 9P protocol messages.
       +The graphics device protocol is used for internal 
       +communication between the
       +.IR devdraw (1)
       +graphics server
       +and the
       +.IR draw (3)
       +library.
       +A
       +.B Wsysmsg
       +is the C structure corresponding to a protocol message.
       +.PP
       +The protocol is intentionally undocumented and may change.
       +.SH SOURCE
       +.B \*9/src/libdraw/drawfcall.c
       +.SH SEE ALSO
       +.IR devdraw (1),
       +.IR draw (3),
       +.IR graphics (3)
   DIR diff --git a/man/man3/event.3 b/man/man3/event.3
       t@@ -382,8 +382,3 @@ is nil, it restores the image to the default arrow.
        .IR plumb (3),
        .\" .IR cons (3),
        .IR draw (3)
       -.SH BUGS
       -.I Etimer
       -and
       -.I estart
       -are unimplemented.
   DIR diff --git a/man/man3/memdraw.3 b/man/man3/memdraw.3
       t@@ -433,7 +433,7 @@ In the kernel,
        .I iprint
        prints to a serial line rather than the screen, for obvious reasons.
        .SH SOURCE
       -.B \*9/src/libdraw
       +.B \*9/src/libmemdraw
        .SH SEE ALSO
        .IR addpt (3),
        .IR color (3),
       t@@ -448,7 +448,3 @@ prints to a serial line rather than the screen, for obvious reasons.
        .I Memimagestring
        is unusual in using a subfont rather than a font,
        and in having no parameter to align the source.
       -.PP
       -These functions are 
       -archived into
       -.IR libdraw .
   DIR diff --git a/man/man3/memlayer.3 b/man/man3/memlayer.3
       t@@ -296,14 +296,10 @@ are in compressed image format
        (see
        .IR image (7)).
        .SH SOURCE
       -.B \*9/src/libdraw
       +.B \*9/src/libmemlayer
        .SH SEE ALSO
        .IR graphics (3),
        .IR memdraw (3),
        .IR stringsize (3),
        .IR window (3),
        .IR draw (3)
       -.SH BUGS
       -These functions
       -are archived into
       -.IR libdraw .
   DIR diff --git a/man/man3/mux.3 b/man/man3/mux.3
       t@@ -16,6 +16,7 @@ struct Mux
                int (*gettag)(Mux *mux, void *msg);
                int (*send)(Mux *mux, void *msg);
                void *(*recv)(Mux *mux);
       +        void *(*nbrecv)(Mux *mux);
                void *aux;
        
                \&...   /* private fields follow */
       t@@ -30,6 +31,12 @@ void*        muxrpc(Mux *mux, void *request);
        .PP
        .B
        void        muxprocs(Mux *mux);
       +.PP
       +.B
       +Muxrpc*        muxrpcstart(Mux *mux, void *request);
       +.PP
       +.B
       +void*        muxrpccanfinish(Muxrpc *rpc);
        .SH DESCRIPTION
        .I Libmux
        is a generic protocol multiplexor.
       t@@ -79,14 +86,19 @@ will block until an executing call finishes.
        .I settag\fR, \fPgettag
        Set or get the tag value in a message.
        .TP
       -.I send\fR, \fPrecv
       +.I send\fR, \fPrecv\fR, \fPnbrecv
        Send or receive protocol messages on the connection.
        .I Recv
        should block until a message is available and
        should return nil if the connection is closed.
       +.I Nbrecv
       +should not block; it returns nil if there is no
       +message available to be read.
        .I Libmux
        will arrange that only one call to
        .I recv
       +or
       +.I nbrecv
        is active at a time.
        .TP
        .I aux
       t@@ -130,6 +142,28 @@ either (particularly
        blocks an entire proc
        and there are other threads in the calling proc
        that need to remain active.
       +.PP
       +.I Libmux
       +also provides a non-blocking interface, useful for programs forced
       +to use a
       +.IR select (2)-based
       +main loop.
       +.I Muxrpcstart
       +runs the first half of
       +.IR muxrpc :
       +it assigns a tag and sends the request,
       +but does not wait for the reply.
       +Instead it returns a pointer to a
       +.B Muxrpc
       +structure that represents the in-progress call.
       +.I Muxrpccanfinish
       +checks whether the given call
       +can finish.
       +If no mux procs have been started,
       +.I muxrpccanfinish
       +may call
       +.I nbrecv
       +to poll for newly arrived responses.
        .SH EXAMPLE
        See
        .B \*9/src/lib9pclient/fs.c