From 5792e7a45cd033a8a0678e460b51521467cf22db Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Mon, 9 Apr 2018 13:09:06 +0100 Subject: C++17 Replace boost shared_mutex with std::mutex to work with new lock helpers. --- netfs/Jamfile.jam | 1 - netfs/daemon/Jamfile.jam | 1 - netfs/daemon/daemonVolume.cpp | 1 - netfs/daemon/daemonVolume.h | 3 +-- netfs/fuse/Jamfile.jam | 1 - netfs/fuse/fuseApp.cpp | 4 ++-- netfs/fuse/fuseApp.h | 10 +++++----- netfs/lib/Jamfile.jam | 1 - 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 : : boost_filesystem ; lib boost_system : : boost_system ; lib boost_random : : boost_random ; -lib boost_thread : : boost_thread ; lib Ice : : Ice++11 ; lib IceBox : : 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 : ../ice//netfs-api ../lib//netfs-common ..//boost_random - ..//boost_thread ..//boost_filesystem ..//boost_system ..//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 #include 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 -#include +#include #include #include #include @@ -44,7 +44,6 @@ class VolumeServer : public NetFS::Volume { private: const boost::filesystem::path root; - mutable boost::shared_mutex lock; const EntCache & userLookup; const EntCache & 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 : netfs-client-configuration ../ice//netfs-api ../lib//netfs-common - ..//boost_thread ..//boost_system ..//boost_filesystem ..//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 -#include +#include +#include #include #include #include @@ -43,7 +43,7 @@ namespace NetFS { typedef boost::icl::interval_map> 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 OpenFilePtr; typedef std::map OpenFiles; @@ -100,7 +100,7 @@ namespace NetFS { virtual struct fuse_context * fuse_get_context() = 0; protected: - typedef boost::function Configurator; + typedef std::function 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 : : ../ice ..//boost_system - ..//boost_thread ../ice//netfs-api ..//adhocutil ../ice//netfs-api -- cgit v1.2.3