diff options
| author | Dan Goodliffe <dan@randomdan.homeip.net> | 2022-04-17 15:46:33 +0100 | 
|---|---|---|
| committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2022-04-17 15:46:33 +0100 | 
| commit | 1972d591a79e5e988f71ac2ed3525f1720ad9612 (patch) | |
| tree | 926aa6c2c00f59ec061fd86e46d80d66d073b846 | |
| parent | Prevent passing null user resolver due to premature move (diff) | |
| download | netfs-1972d591a79e5e988f71ac2ed3525f1720ad9612.tar.bz2 netfs-1972d591a79e5e988f71ac2ed3525f1720ad9612.tar.xz netfs-1972d591a79e5e988f71ac2ed3525f1720ad9612.zip  | |
Rename underscore named variables
| -rw-r--r-- | netfs/fuse/fuseApp.cpp | 8 | ||||
| -rw-r--r-- | netfs/fuse/fuseApp.h | 2 | ||||
| -rw-r--r-- | netfs/fuse/fuseApp.impl.h | 6 | ||||
| -rw-r--r-- | netfs/fuse/fuseAppBase.h | 6 | ||||
| -rw-r--r-- | netfs/fuse/fuseFiles.cpp | 14 | ||||
| -rw-r--r-- | netfs/fuse/fuseFiles.h | 2 | ||||
| -rw-r--r-- | netfs/unittests/mockFuse.cpp | 2 | 
7 files changed, 20 insertions, 20 deletions
diff --git a/netfs/fuse/fuseApp.cpp b/netfs/fuse/fuseApp.cpp index cfd9689..a206e60 100644 --- a/netfs/fuse/fuseApp.cpp +++ b/netfs/fuse/fuseApp.cpp @@ -160,7 +160,7 @@ NetFS::FuseApp::opt_parse(void * data, const char * arg, int, struct fuse_args *  void  NetFS::FuseApp::connectSession()  { -	Lock(_lock); +	Lock(mutex);  	if (!sessionOpened && ic->getDefaultRouter()) {  		auto router = Ice::checkedCast<Glacier2::RouterPrx>(ic->getDefaultRouter());  		session = router->createSession("", ""); @@ -175,7 +175,7 @@ NetFS::FuseApp::connectSession()  void  NetFS::FuseApp::connectToService()  { -	Lock(_lock); +	Lock(mutex);  	if (!service) {  		auto proxyAddr = fcr->ServiceIdentity;  		for (const auto & ep : fcr->Endpoints) { @@ -191,7 +191,7 @@ NetFS::FuseApp::connectToService()  void  NetFS::FuseApp::connectToVolume(bool force)  { -	Lock(_lock); +	Lock(mutex);  	if (force || !volume) {  		volume = service->connect(fcr->ExportName, fcr->AuthToken);  		if (!volume) { @@ -224,7 +224,7 @@ NetFS::FuseApp::connectHandles()  void  NetFS::FuseApp::verifyConnection()  { -	Lock(_lock); +	Lock(mutex);  	if (session) {  		try {  			session->ice_ping(); diff --git a/netfs/fuse/fuseApp.h b/netfs/fuse/fuseApp.h index 6b975aa..dcb00c7 100644 --- a/netfs/fuse/fuseApp.h +++ b/netfs/fuse/fuseApp.h @@ -98,7 +98,7 @@ namespace NetFS {  		Ice::StringSeq iceArgs;  		Ice::CommunicatorPtr ic;  		Client::ResourcePtr fcr; -		mutable std::shared_mutex _proxymaplock; +		mutable std::shared_mutex proxyMapMutex;  		NetFS::VolumePrxPtr volume;  		NetFS::ServicePrxPtr service; diff --git a/netfs/fuse/fuseApp.impl.h b/netfs/fuse/fuseApp.impl.h index 9947f36..af05b0b 100644 --- a/netfs/fuse/fuseApp.impl.h +++ b/netfs/fuse/fuseApp.impl.h @@ -11,7 +11,7 @@ namespace NetFS {  	FuseApp::setProxy(uint64_t & fh, const Params &... params)  	{  		auto & map = getMap<Handle>(); -		Lock(_proxymaplock); +		Lock(proxyMapMutex);  		while (map.find(fh = ++openHandleId) != map.end()) { }  		map.emplace(fh, std::make_shared<typename Handle::element_type>(params...));  	} @@ -21,7 +21,7 @@ namespace NetFS {  	FuseApp::getProxy(uint64_t localID)  	{  		const auto & map = getMap<Handle>(); -		SharedLock(_proxymaplock); +		SharedLock(proxyMapMutex);  		auto i = map.find(localID);  		if (i != map.end()) {  			return i->second; @@ -34,7 +34,7 @@ namespace NetFS {  	FuseApp::clearProxy(uint64_t localID)  	{  		auto & map = getMap<Handle>(); -		Lock(_proxymaplock); +		Lock(proxyMapMutex);  		map.erase(localID);  	}  } diff --git a/netfs/fuse/fuseAppBase.h b/netfs/fuse/fuseAppBase.h index 7d8edce..ef7b27f 100644 --- a/netfs/fuse/fuseAppBase.h +++ b/netfs/fuse/fuseAppBase.h @@ -70,7 +70,7 @@ public:  			__attribute__((__format__(__printf__, 3, 0)))  			= 0; -	mutable std::shared_mutex _lock; +	mutable std::shared_mutex mutex;  protected:  	static FuseAppBase * fuseApp; @@ -81,7 +81,7 @@ protected:  	{  		if constexpr (Implemented) {  			return [](auto... a) { -				SharedLock(fuseApp->_lock); +				SharedLock(fuseApp->mutex);  				return (fuseApp->*bfunc)(a...);  			};  		} @@ -99,7 +99,7 @@ protected:  				for (int t = 0;; ++t) {  					try {  						fuseApp->beforeOperation(); -						SharedLock(fuseApp->_lock); +						SharedLock(fuseApp->mutex);  						return (fuseApp->*bfunc)(a...);  					}  					catch (const std::exception & ex) { 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);  								}  							}); diff --git a/netfs/fuse/fuseFiles.h b/netfs/fuse/fuseFiles.h index 16ded5e..ca6cf53 100644 --- a/netfs/fuse/fuseFiles.h +++ b/netfs/fuse/fuseFiles.h @@ -25,7 +25,7 @@ namespace NetFS {  		using BGs = boost::icl::interval_map<size_t, std::shared_ptr<WriteState>>;  		static BGs::interval_type range(off_t, size_t);  		BGs bg; -		mutable std::shared_mutex _lock; +		mutable std::shared_mutex mutex;  	};  } diff --git a/netfs/unittests/mockFuse.cpp b/netfs/unittests/mockFuse.cpp index b283d7b..5f28c95 100644 --- a/netfs/unittests/mockFuse.cpp +++ b/netfs/unittests/mockFuse.cpp @@ -25,7 +25,7 @@ FuseMock::connectToService()  	}  	if (!service) { -		Lock(_lock); +		Lock(mutex);  		std::string addr = fcr->ServiceIdentity + ":" + testEndpoint;  		service = Ice::checkedCast<NetFS::ServicePrx>(ic->stringToProxy(addr));  		if (!service) {  | 
