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
8b5e9340
Commit
8b5e9340
authored
Oct 21, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
81605d48
Changes
1
Show 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;
...
@@ -28,6 +28,9 @@ using namespace golang;
template
<
typename
Key
,
typename
Value
>
template
<
typename
Key
,
typename
Value
>
using
dict
=
std
::
unordered_map
<
Key
,
Value
>
;
using
dict
=
std
::
unordered_map
<
Key
,
Value
>
;
#include <vector>
using
std
::
vector
;
#include <stdint.h>
#include <stdint.h>
typedef
uint64_t
Tid
;
// XXX ok?
typedef
uint64_t
Tid
;
// XXX ok?
...
@@ -40,6 +43,7 @@ struct IContext {
...
@@ -40,6 +43,7 @@ struct IContext {
struct
Conn
;
struct
Conn
;
struct
_File
;
struct
_File
;
struct
_Mapping
;
struct
WatchLink
;
struct
WatchLink
;
struct
SrvReq
;
struct
SrvReq
;
...
@@ -72,10 +76,21 @@ private:
...
@@ -72,10 +76,21 @@ private:
//
//
// XXX doc
// XXX doc
struct
_File
{
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
// XXX struct WatchLink
...
@@ -150,5 +165,7 @@ void Conn::_pin1(SrvReq *req) {
...
@@ -150,5 +165,7 @@ void Conn::_pin1(SrvReq *req) {
_File
*
f
=
_
->
second
;
_File
*
f
=
_
->
second
;
// XXX relock wconn -> f ?
wconn
->
_filemu
.
unlock
();
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