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
115ee9b1
Commit
115ee9b1
authored
Oct 21, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
6d7e1b2c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
57 additions
and
0 deletions
+57
-0
wcfs/internal/wcfs_virtmem.cpp
wcfs/internal/wcfs_virtmem.cpp
+57
-0
No files found.
wcfs/internal/wcfs_virtmem.cpp
View file @
115ee9b1
...
...
@@ -20,3 +20,60 @@
// wcfs_virtmem provides wcfs client integrated with user-spce virtmem layer.
//
// XXX provides isolated view.
#include <golang/libgolang.h>
using
namespace
golang
;
#include <unordered_map>
template
<
typename
Key
,
typename
Value
>
using
dict
=
std
::
unordered_map
<
Key
,
Value
>
;
#include <stdint.h>
typedef
uint64_t
Tid
;
// XXX ok?
struct
Conn
;
struct
_File
;
// XXX doc
struct
WCFS
{
Conn
*
connect
(
Tid
at
);
};
// XXX doc
struct
Conn
{
WCFS
*
_wc
;
Tid
at
;
// _wlink
sync
::
Mutex
_filemu
;
dict
<
Tid
,
_File
*>
_filetab
;
// {} foid -> _file
};
// XXX doc
struct
_File
{
// XXX
};
// XXX struct Mapping
Conn
*
WCFS
::
connect
(
Tid
at
)
{
WCFS
*
wc
=
this
;
Conn
*
wconn
=
new
Conn
();
// TODO support !isolated mode
wconn
->
_wc
=
wc
;
wconn
->
at
=
at
;
// wconn._wlink = WatchLink(wc) XXX
// XXX reenable
#if 0
pinCtx, wconn._pinCancel = context.with_cancel(context.background())
wconn._pinWG = sync.WorkGroup(pinCtx)
wconn._pinWG.go(wconn._pinner)
#endif
return
wconn
;
}
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