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
1c652136
Commit
1c652136
authored
Mar 02, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
267c3a34
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
1 deletion
+11
-1
wcfs/client/wcfs.cpp
wcfs/client/wcfs.cpp
+5
-1
wcfs/client/wcfs_misc.cpp
wcfs/client/wcfs_misc.cpp
+3
-0
wcfs/client/wcfs_misc.h
wcfs/client/wcfs_misc.h
+3
-0
No files found.
wcfs/client/wcfs.cpp
View file @
1c652136
...
...
@@ -589,7 +589,8 @@ error _Conn::resync(zodb::Tid at) {
//FileH f = fit.second;
// XXX need to lock f.mu because wconn.atMu is only R now.
// XXX need to coordinate with e.g. FileH.close
// XXX need to coordinate with e.g. FileH.close -> "if f.state != CLOSING" ?
// XXX need to coordinate with e.g. Conn.open -> "if f.state != OPENING" ?
string
ack
;
// XXX f._watchMu.lock() + unlock()
// XXX + recheck status before sending the watch?
...
...
@@ -632,6 +633,7 @@ pair<FileH, error> _Conn::open(zodb::Oid foid) {
f
->
_nopen
++
;
// XXX lock by f.mu ?
wconn
.
_mu
.
Unlock
();
// wait for: "opening" -> opened
f
->
_openReady
.
recv
();
if
(
f
->
_openErr
!=
nil
)
{
// don't care about f->_nopen-- since f is not returned anywhere
...
...
@@ -805,6 +807,8 @@ pair<Mapping, error> _FileH::mmap(int64_t blk_start, int64_t blk_len, VMA *vma)
xerr
::
Contextf
E
(
"%s: mmap f<%s> [blk%ld +blk%ld)"
,
v
(
f
.
wconn
),
v
(
f
.
foid
),
blk_start
,
blk_len
);
// XXX closed -> return E(os::ErrClosed)
error
err
;
if
(
blk_start
<
0
)
...
...
wcfs/client/wcfs_misc.cpp
View file @
1c652136
...
...
@@ -37,6 +37,9 @@ using namespace golang;
// os::
namespace
os
{
global
<
error
>
ErrClosed
=
errors
::
New
(
"file already closed"
);
// XXX -> make public
static
error
_pathError
(
const
char
*
op
,
const
string
&
path
,
int
syserr
);
...
...
wcfs/client/wcfs_misc.h
View file @
1c652136
...
...
@@ -58,6 +58,9 @@ using std::vector;
// os::
namespace
os
{
extern
global
<
error
>
ErrClosed
;
// os::File mimics os.File from Go.
// its operations return error with full file context.
typedef
refptr
<
class
_File
>
File
;
...
...
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