Commit 2eb9c369 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent e19d6686
......@@ -152,7 +152,7 @@ class WatchLink {
chan<structZ> _rxeof; // becomes ready when wcfs closes its tx side
// inv.protocol message IO
_acceptq = chan() // (stream, msg) server originated messages go here
chan<(stream,msg)> _acceptq; // server originated messages go here
sync::Mutex _rxmu;
dict<stream, chan<XXX>> _rxtab; // {} stream -> rxq server replies go via here
set<stream> _accepted; // streams we accepted but did not replied yet
......@@ -162,9 +162,8 @@ class WatchLink {
bool _txclosed; // XXX = False
#if 0
serveCtx, wlink._serveCancel = context.with_cancel(context.background())
wlink._serveWG = sync.WorkGroup(serveCtx)
wlink._serveWG.go(wlink._serveRX)
func() _serveCancel
sync.WorkGroup *_serveWG
#endif
public:
......@@ -174,7 +173,7 @@ public:
// SrvReq represents 1 server-initiated wcfs request received over /head/watch link.
// XXX -> PinReq?
struct SrvReq {
// XXX
uint64_t stream // request was received with this stream ID
Oid foid; // request is about this file
int64_t blk; // ----//---- about this block
Tid at; // pin to this at XXX ffff = None = unpin
......@@ -337,7 +336,16 @@ tuple<WatchLink*, error> WCFS::_openwatch() {
wlink = new(WatchLink);
wlink->_wc = wc;
wlink->_f = f;
wlink->rx_eof = makechan<structZ>();
wlink->_rx_eof = makechan<structZ>();
wlink->_acceptq = makechan<XXX>();
wlink->_req_next = 1;
wlink->_txclosed = false;
#if 0
serveCtx, wlink._serveCancel = context.with_cancel(context.background())
wlink->_serveWG = sync.WorkGroup(serveCtx)
wlink->_serveWG.go(wlink._serveRX)
#endif
}
// XXX close
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment