diff options
author | rsc <devnull@localhost> | 2006-06-25 23:50:02 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2006-06-25 23:50:02 +0000 |
commit | c02bc16b4b963327a66f7455c23665f55d63b398 (patch) | |
tree | 047de28111a76a0cb69e87156689b355c8a7ff10 /include | |
parent | eacc13ea5cb1f59e3d1365c1149a77c5ef804e7d (diff) | |
download | plan9port-c02bc16b4b963327a66f7455c23665f55d63b398.tar.gz plan9port-c02bc16b4b963327a66f7455c23665f55d63b398.tar.bz2 plan9port-c02bc16b4b963327a66f7455c23665f55d63b398.zip |
nbrecv
Diffstat (limited to 'include')
-rw-r--r-- | include/mux.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/include/mux.h b/include/mux.h index 01d1779c..53321fa5 100644 --- a/include/mux.h +++ b/include/mux.h @@ -12,11 +12,13 @@ typedef struct Muxqueue Muxqueue; struct Muxrpc { + Mux *mux; Muxrpc *next; Muxrpc *prev; Rendez r; uint tag; void *p; + int waiting; }; struct Mux @@ -25,6 +27,7 @@ struct Mux uint maxtag; int (*send)(Mux*, void*); void *(*recv)(Mux*); + void *(*nbrecv)(Mux*); int (*gettag)(Mux*, void*); int (*settag)(Mux*, void*, uint); void *aux; /* for private use by client */ @@ -41,17 +44,19 @@ struct Mux uint mwait; uint freetag; Muxrpc **wait; - uint muxer; + Muxrpc *muxer; Muxrpc sleep; }; void muxinit(Mux*); void* muxrpc(Mux*, void*); -void muxthreads(Mux*); +void muxprocs(Mux*); +Muxrpc* muxrpcstart(Mux*, void*); +void* muxrpccanfinish(Muxrpc*); /* private */ int _muxsend(Mux*, void*); -void* _muxrecv(Mux*); +void* _muxrecv(Mux*, int); void _muxsendproc(void*); void _muxrecvproc(void*); Muxqueue *_muxqalloc(void); |