Kitzunu 2021-01-10 14:27:55 +01:00 committed by GitHub
parent 7cf097eab2
commit da4edd547d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
315 changed files with 3 additions and 729 deletions

View file

@ -20,7 +20,6 @@ namespace acore
class GeneralLock
{
public:
GeneralLock(MUTEX& m)
: i_mutex(m)
{
@ -33,7 +32,6 @@ namespace acore
}
private:
GeneralLock(const GeneralLock&);
GeneralLock& operator=(const GeneralLock&);
MUTEX& i_mutex;
@ -43,7 +41,6 @@ namespace acore
class SingleThreaded
{
public:
struct Lock // empty object
{
Lock()
@ -63,7 +60,6 @@ namespace acore
class ObjectLevelLockable
{
public:
ObjectLevelLockable()
: i_mtx()
{
@ -74,19 +70,16 @@ namespace acore
class Lock
{
public:
Lock(ObjectLevelLockable<T, MUTEX>& host)
: i_lock(host.i_mtx)
{
}
private:
GeneralLock<MUTEX> i_lock;
};
private:
// prevent the compiler creating a copy construct
ObjectLevelLockable(const ObjectLevelLockable<T, MUTEX>&);
ObjectLevelLockable<T, MUTEX>& operator=(const ObjectLevelLockable<T, MUTEX>&);
@ -98,7 +91,6 @@ namespace acore
class ClassLevelLockable
{
public:
ClassLevelLockable()
{
}
@ -108,7 +100,6 @@ namespace acore
class Lock
{
public:
Lock(const T& /*host*/)
{
ClassLevelLockable<T, MUTEX>::si_mtx.lock();
@ -131,7 +122,6 @@ namespace acore
};
private:
static MUTEX si_mtx;
};
}