Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Joshua
wendelin.core
Commits
2eb9c369
Commit
2eb9c369
authored
Oct 23, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
e19d6686
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
13 deletions
+21
-13
wcfs/internal/wcfs_virtmem.cpp
wcfs/internal/wcfs_virtmem.cpp
+21
-13
No files found.
wcfs/internal/wcfs_virtmem.cpp
View file @
2eb9c369
...
...
@@ -152,19 +152,18 @@ 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
sync
::
Mutex
_rxmu
;
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
set
<
stream
>
_accepted
;
// streams we accepted but did not replied yet
XXXint
_req_next
=
1
;
// stream ID for next client-originated request XXX -> atomic
sync
::
Mutex
_txmu
// serializes writes
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,10 +173,10 @@ public:
// SrvReq represents 1 server-initiated wcfs request received over /head/watch link.
// XXX -> PinReq?
struct
SrvReq
{
// XXX
Oid
foid
;
// request is about this file
int64_t
blk
;
// ----//---- about this block
Tid
at
;
// pin to this at XXX ffff = None = unpin
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
};
...
...
@@ -335,9 +334,18 @@ tuple<WatchLink*, error> WCFS::_openwatch() {
return
make_tuple
(
NULL
,
err
);
wlink
=
new
(
WatchLink
);
wlink
->
_wc
=
wc
;
wlink
->
_f
=
f
;
wlink
->
rx_eof
=
makechan
<
structZ
>
();
wlink
->
_wc
=
wc
;
wlink
->
_f
=
f
;
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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment