mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-10-19 16:16:48 +00:00
Remove unused rwlock.hpp header and includes
rwlock.hpp was left over after migrating to atomic shared pointers for branches configuration. No code references ReadGuard/WriteGuard any longer, so drop the header and its stale includes.
This commit is contained in:
committed by
trapexit
parent
ff48ff6047
commit
aa46001923
@@ -47,7 +47,6 @@
|
||||
#include "fuse_cfg.hpp"
|
||||
#include "fuse_readdir.hpp"
|
||||
#include "policy.hpp"
|
||||
#include "rwlock.hpp"
|
||||
#include "tofrom_ref.hpp"
|
||||
#include "tofrom_wrapper.hpp"
|
||||
#include "syslog.hpp"
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
#include "fs_statvfs_cache.hpp"
|
||||
#include "policy.hpp"
|
||||
#include "policy_error.hpp"
|
||||
#include "rwlock.hpp"
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
#include "fs_statvfs_cache.hpp"
|
||||
#include "policy.hpp"
|
||||
#include "policy_error.hpp"
|
||||
#include "rwlock.hpp"
|
||||
|
||||
#include <limits>
|
||||
#include <string>
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
#include "policy.hpp"
|
||||
#include "policy_error.hpp"
|
||||
#include "rnd.hpp"
|
||||
#include "rwlock.hpp"
|
||||
#include "strvec.hpp"
|
||||
|
||||
#include <string>
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
#include "fs_statvfs_cache.hpp"
|
||||
#include "policy.hpp"
|
||||
#include "policy_error.hpp"
|
||||
#include "rwlock.hpp"
|
||||
|
||||
#include "base_types.h"
|
||||
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
#include "fs_statvfs_cache.hpp"
|
||||
#include "policy.hpp"
|
||||
#include "policy_error.hpp"
|
||||
#include "rwlock.hpp"
|
||||
|
||||
#include <string>
|
||||
#include <limits>
|
||||
|
||||
@@ -1,66 +0,0 @@
|
||||
/*
|
||||
ISC License
|
||||
|
||||
Copyright (c) 2026, Antonio SJ Musumeci <trapexit@spawn.link>
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
namespace rwlock
|
||||
{
|
||||
class ReadGuard
|
||||
{
|
||||
public:
|
||||
ReadGuard(pthread_rwlock_t &lock_)
|
||||
: _lock(lock_)
|
||||
{
|
||||
pthread_rwlock_rdlock(&_lock);
|
||||
}
|
||||
|
||||
~ReadGuard()
|
||||
{
|
||||
pthread_rwlock_unlock(&_lock);
|
||||
}
|
||||
|
||||
private:
|
||||
ReadGuard();
|
||||
|
||||
private:
|
||||
pthread_rwlock_t &_lock;
|
||||
};
|
||||
|
||||
class WriteGuard
|
||||
{
|
||||
public:
|
||||
WriteGuard(pthread_rwlock_t &lock_)
|
||||
: _lock(lock_)
|
||||
{
|
||||
pthread_rwlock_wrlock(&_lock);
|
||||
}
|
||||
|
||||
~WriteGuard()
|
||||
{
|
||||
pthread_rwlock_unlock(&_lock);
|
||||
}
|
||||
|
||||
private:
|
||||
WriteGuard();
|
||||
|
||||
private:
|
||||
pthread_rwlock_t &_lock;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user