summaryrefslogtreecommitdiff
path: root/netfs/fuse
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2018-04-09 13:09:06 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2018-04-09 13:17:24 +0100
commit5792e7a45cd033a8a0678e460b51521467cf22db (patch)
tree92a00f64e07e62ca556eb713cd404e3e5e61b3b4 /netfs/fuse
parentC++17 (diff)
downloadnetfs-5792e7a45cd033a8a0678e460b51521467cf22db.tar.bz2
netfs-5792e7a45cd033a8a0678e460b51521467cf22db.tar.xz
netfs-5792e7a45cd033a8a0678e460b51521467cf22db.zip
C++17
Replace boost shared_mutex with std::mutex to work with new lock helpers.
Diffstat (limited to 'netfs/fuse')
-rw-r--r--netfs/fuse/Jamfile.jam1
-rw-r--r--netfs/fuse/fuseApp.cpp4
-rw-r--r--netfs/fuse/fuseApp.h10
3 files changed, 7 insertions, 8 deletions
diff --git a/netfs/fuse/Jamfile.jam b/netfs/fuse/Jamfile.jam
index 8e25090..5e3967e 100644
--- a/netfs/fuse/Jamfile.jam
+++ b/netfs/fuse/Jamfile.jam
@@ -28,7 +28,6 @@ lib netfs-client :
<implicit-dependency>netfs-client-configuration
<library>../ice//netfs-api
<library>../lib//netfs-common
- <library>..//boost_thread
<library>..//boost_system
<library>..//boost_filesystem
<library>..//Ice
diff --git a/netfs/fuse/fuseApp.cpp b/netfs/fuse/fuseApp.cpp
index 98fba81..a5dd0b1 100644
--- a/netfs/fuse/fuseApp.cpp
+++ b/netfs/fuse/fuseApp.cpp
@@ -115,11 +115,11 @@ NetFS::FuseApp::opt_parse(void *, const char * arg, int, struct fuse_args *)
}
else if (!configurator) {
if (strstr(arg, "://")) {
- configurator = boost::bind(&NetFS::FuseApp::configureFromUri, this, arg);
+ configurator = std::bind(&NetFS::FuseApp::configureFromUri, this, arg);
}
else {
const char * colon = strchr(arg, ':');
- configurator = boost::bind(&NetFS::FuseApp::configureFromFile, this, std::string(arg, colon), colon + 1);
+ configurator = std::bind(&NetFS::FuseApp::configureFromFile, this, std::string(arg, colon), colon + 1);
}
return 0;
}
diff --git a/netfs/fuse/fuseApp.h b/netfs/fuse/fuseApp.h
index 237e711..35c56dd 100644
--- a/netfs/fuse/fuseApp.h
+++ b/netfs/fuse/fuseApp.h
@@ -1,8 +1,8 @@
#ifndef NETFS_FUSE_H
#define NETFS_FUSE_H
-#include <boost/thread/shared_mutex.hpp>
-#include <boost/function.hpp>
+#include <shared_mutex>
+#include <functional>
#include <boost/filesystem/path.hpp>
#include <Ice/Ice.h>
#include <Glacier2/Session.h>
@@ -43,7 +43,7 @@ namespace NetFS {
typedef boost::icl::interval_map<Ice::Long, std::shared_ptr<WriteState>> BGs;
static BGs::interval_type range(off_t, size_t);
BGs bg;
- mutable boost::shared_mutex _lock;
+ mutable std::shared_mutex _lock;
};
typedef std::shared_ptr<OpenFile> OpenFilePtr;
typedef std::map<int, OpenFilePtr> OpenFiles;
@@ -100,7 +100,7 @@ namespace NetFS {
virtual struct fuse_context * fuse_get_context() = 0;
protected:
- typedef boost::function<Client::ResourcePtr()> Configurator;
+ typedef std::function<Client::ResourcePtr()> Configurator;
Configurator configurator;
virtual NetFS::Client::ConfigurationPtr ReadConfiguration(const boost::filesystem::path &) const;
virtual NetFS::Client::ResourcePtr configureFromFile(const std::string &, const std::string &) const;
@@ -124,7 +124,7 @@ namespace NetFS {
Ice::StringSeq args;
Ice::CommunicatorPtr ic;
Client::ResourcePtr fcr;
- mutable boost::shared_mutex _lock;
+ mutable std::shared_mutex _lock;
NetFS::VolumePrxPtr volume;
NetFS::ServicePrxPtr service;