summaryrefslogtreecommitdiff
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
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.
-rw-r--r--netfs/Jamfile.jam1
-rw-r--r--netfs/daemon/Jamfile.jam1
-rw-r--r--netfs/daemon/daemonVolume.cpp1
-rw-r--r--netfs/daemon/daemonVolume.h3
-rw-r--r--netfs/fuse/Jamfile.jam1
-rw-r--r--netfs/fuse/fuseApp.cpp4
-rw-r--r--netfs/fuse/fuseApp.h10
-rw-r--r--netfs/lib/Jamfile.jam1
8 files changed, 8 insertions, 14 deletions
diff --git a/netfs/Jamfile.jam b/netfs/Jamfile.jam
index fcd463d..78391cf 100644
--- a/netfs/Jamfile.jam
+++ b/netfs/Jamfile.jam
@@ -1,7 +1,6 @@
lib boost_filesystem : : <name>boost_filesystem ;
lib boost_system : : <name>boost_system ;
lib boost_random : : <name>boost_random ;
-lib boost_thread : : <name>boost_thread ;
lib Ice : : <name>Ice++11 ;
lib IceBox : : <name>IceBox++11 ;
lib pthread ;
diff --git a/netfs/daemon/Jamfile.jam b/netfs/daemon/Jamfile.jam
index 4669c66..f573bf2 100644
--- a/netfs/daemon/Jamfile.jam
+++ b/netfs/daemon/Jamfile.jam
@@ -28,7 +28,6 @@ lib netfsd :
<library>../ice//netfs-api
<library>../lib//netfs-common
<library>..//boost_random
- <library>..//boost_thread
<library>..//boost_filesystem
<library>..//boost_system
<library>..//Ice
diff --git a/netfs/daemon/daemonVolume.cpp b/netfs/daemon/daemonVolume.cpp
index e57c806..956212f 100644
--- a/netfs/daemon/daemonVolume.cpp
+++ b/netfs/daemon/daemonVolume.cpp
@@ -8,7 +8,6 @@
#include "daemonVolume.h"
#include "daemonFile.h"
#include "daemonDirectory.h"
-#include "lockHelpers.h"
#include "modeCheck.h"
#include <boost/filesystem/operations.hpp>
#include <boost/algorithm/string/predicate.hpp>
diff --git a/netfs/daemon/daemonVolume.h b/netfs/daemon/daemonVolume.h
index 7c27821..ff00d4d 100644
--- a/netfs/daemon/daemonVolume.h
+++ b/netfs/daemon/daemonVolume.h
@@ -2,7 +2,7 @@
#define DAEMONVOLUME_H
#include <volume.h>
-#include <boost/thread/shared_mutex.hpp>
+#include <shared_mutex>
#include <boost/filesystem/path.hpp>
#include <entCache.h>
#include <typeConverter.h>
@@ -44,7 +44,6 @@ class VolumeServer : public NetFS::Volume {
private:
const boost::filesystem::path root;
- mutable boost::shared_mutex lock;
const EntCache<User> & userLookup;
const EntCache<Group> & groupLookup;
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;
diff --git a/netfs/lib/Jamfile.jam b/netfs/lib/Jamfile.jam
index 4ac7784..87b8ba4 100644
--- a/netfs/lib/Jamfile.jam
+++ b/netfs/lib/Jamfile.jam
@@ -3,7 +3,6 @@ lib netfs-common :
:
<include>../ice
<library>..//boost_system
- <library>..//boost_thread
<library>../ice//netfs-api
<library>..//adhocutil
<implicit-dependency>../ice//netfs-api