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
8b5e9340
Commit
8b5e9340
authored
Oct 21, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
81605d48
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
2 deletions
+19
-2
wcfs/internal/wcfs_virtmem.cpp
wcfs/internal/wcfs_virtmem.cpp
+19
-2
No files found.
wcfs/internal/wcfs_virtmem.cpp
View file @
8b5e9340
...
...
@@ -28,6 +28,9 @@ using namespace golang;
template
<
typename
Key
,
typename
Value
>
using
dict
=
std
::
unordered_map
<
Key
,
Value
>
;
#include <vector>
using
std
::
vector
;
#include <stdint.h>
typedef
uint64_t
Tid
;
// XXX ok?
...
...
@@ -40,6 +43,7 @@ struct IContext {
struct
Conn
;
struct
_File
;
struct
_Mapping
;
struct
WatchLink
;
struct
SrvReq
;
...
...
@@ -72,10 +76,21 @@ private:
//
// XXX doc
struct
_File
{
// XXX
Conn
*
wconn
;
Oid
foid
;
// hex of ZBigFile root object ID
// .blksize block size of this file
// .headf file object of head/file
// .headfsize head/file size is known to be at least headfsize (size ↑=)
dict
<
int64_t
,
Tid
>
pinned
;
// {} blk -> rev that wcfs already sent us for this file
vector
<
_Mapping
*>
mmaps
;
// []_Mapping ↑blk_start mappings of this file
};
// XXX struct Mapping
// _Mapping represents one mapping of _File.
struct
_Mapping
{
_File
*
file
;
int
blk_start
;
// offset of this mapping in file
// .mem mmaped memory
};
// XXX struct WatchLink
...
...
@@ -150,5 +165,7 @@ void Conn::_pin1(SrvReq *req) {
_File
*
f
=
_
->
second
;
// XXX relock wconn -> f ?
wconn
->
_filemu
.
unlock
();
}
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