summaryrefslogtreecommitdiff
path: root/netfs/fuse/fuseFiles.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'netfs/fuse/fuseFiles.cpp')
-rw-r--r--netfs/fuse/fuseFiles.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/netfs/fuse/fuseFiles.cpp b/netfs/fuse/fuseFiles.cpp
index 1ab568c..9f7bf5e 100644
--- a/netfs/fuse/fuseFiles.cpp
+++ b/netfs/fuse/fuseFiles.cpp
@@ -24,7 +24,7 @@ namespace NetFS {
FuseApp::OpenFile::wait() const
{
auto cbg = [this]() {
- SharedLock(_lock);
+ SharedLock(mutex);
return bg;
}();
for (const auto & w : cbg) {
@@ -36,7 +36,7 @@ namespace NetFS {
FuseApp::OpenFile::flush()
{
auto first = [this]() {
- SharedLock(_lock);
+ SharedLock(mutex);
return bg.empty() ? nullptr : bg.begin()->second;
};
while (auto w = first()) {
@@ -116,7 +116,7 @@ namespace NetFS {
{
const auto key = OpenFile::range(o, s);
while (true) {
- std::unique_lock<decltype(of->_lock)> _l(of->_lock);
+ std::unique_lock lock(of->mutex);
// Acquire operations to wait for
auto R = of->bg.equal_range(key);
if (R.first == R.second) {
@@ -130,11 +130,11 @@ namespace NetFS {
overlap.push_back(i->second);
}
// Wait for them whilst unlocked
- _l.release()->unlock();
+ lock.release()->unlock();
for (const auto & r : overlap) {
r->future.wait();
}
- // Cause this thread to yield so the callback can acquire _lock
+ // Cause this thread to yield so the callback can lock mutex
usleep(0);
}
}
@@ -178,13 +178,13 @@ namespace NetFS {
o, safe {s}, Buffer(buf, buf + s),
[p, of, key]() {
p->promise.set_value();
- ScopeLock(of->_lock) {
+ ScopeLock(of->mutex) {
of->bg.erase(key);
}
},
[p, of, key](auto e) {
p->promise.set_exception(e);
- ScopeLock(of->_lock) {
+ ScopeLock(of->mutex) {
of->bg.erase(key);
}
});