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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Kirill Smelkov
wendelin.core
Commits
c4013452
Commit
c4013452
authored
Oct 21, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
115ee9b1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
1 deletion
+25
-1
wcfs/internal/wcfs_virtmem.cpp
wcfs/internal/wcfs_virtmem.cpp
+25
-1
No files found.
wcfs/internal/wcfs_virtmem.cpp
View file @
c4013452
...
...
@@ -31,16 +31,26 @@ using dict = std::unordered_map<Key, Value>;
#include <stdint.h>
typedef
uint64_t
Tid
;
// XXX ok?
typedef
uint64_t
Oid
;
// XXX ok?
// XXX ok?
struct
IContext
{
virtual
chan
<
structZ
>
done
()
=
0
;
};
struct
Conn
;
struct
_File
;
// WCFS represents filesystem-level connection to wcfs server.
// XXX doc
struct
WCFS
{
Conn
*
connect
(
Tid
at
);
};
// Conn represents logical connection that provides view of data on wcfs
// filesystem as of particular database state.
//
// XXX doc
struct
Conn
{
WCFS
*
_wc
;
...
...
@@ -48,9 +58,15 @@ struct Conn {
// _wlink
sync
::
Mutex
_filemu
;
dict
<
Tid
,
_File
*>
_filetab
;
// {} foid -> _file
dict
<
Oid
,
_File
*>
_filetab
;
// {} foid -> _file
private:
void
_pinner
(
IContext
*
ctx
);
};
// _File represent isolated file view under Conn.
//
// XXX doc
struct
_File
{
// XXX
...
...
@@ -59,6 +75,7 @@ struct _File {
// XXX struct Mapping
// connect creates new Conn viewing WCFS state as of @at.
Conn
*
WCFS
::
connect
(
Tid
at
)
{
WCFS
*
wc
=
this
;
...
...
@@ -77,3 +94,10 @@ Conn *WCFS::connect(Tid at) {
return
wconn
;
}
// XXX Conn::close
// _pinner receives pin messages from wcfs and adjusts wconn mappings.
void
Conn
::
_pinner
(
IContext
*
ctx
)
{
Conn
*
wconn
=
this
;
}
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