mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-27 02:53:10 +01:00
fix(SpinlockMutex): VS2022 compilation issues #3693
This commit is contained in:
@@ -22,16 +22,7 @@
|
|||||||
#include "Poco/Exception.h"
|
#include "Poco/Exception.h"
|
||||||
#include "Poco/ScopedLock.h"
|
#include "Poco/ScopedLock.h"
|
||||||
#include "Poco/Timestamp.h"
|
#include "Poco/Timestamp.h"
|
||||||
|
#include <atomic>
|
||||||
#if __cplusplus >= 201103L
|
|
||||||
#ifndef POCO_HAVE_STD_ATOMICS
|
|
||||||
#define POCO_HAVE_STD_ATOMICS
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef POCO_HAVE_STD_ATOMICS
|
|
||||||
#include <atomic>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#if defined(POCO_OS_FAMILY_WINDOWS)
|
#if defined(POCO_OS_FAMILY_WINDOWS)
|
||||||
@@ -161,8 +152,6 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#ifdef POCO_HAVE_STD_ATOMICS
|
|
||||||
|
|
||||||
class Foundation_API SpinlockMutex
|
class Foundation_API SpinlockMutex
|
||||||
/// A SpinlockMutex, implemented in terms of std::atomic_flag, as
|
/// A SpinlockMutex, implemented in terms of std::atomic_flag, as
|
||||||
/// busy-wait mutual exclusion.
|
/// busy-wait mutual exclusion.
|
||||||
@@ -210,8 +199,6 @@ private:
|
|||||||
std::atomic_flag _flag = ATOMIC_FLAG_INIT;
|
std::atomic_flag _flag = ATOMIC_FLAG_INIT;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // POCO_HAVE_STD_ATOMICS
|
|
||||||
|
|
||||||
|
|
||||||
class Foundation_API NullMutex
|
class Foundation_API NullMutex
|
||||||
/// A NullMutex is an empty mutex implementation
|
/// A NullMutex is an empty mutex implementation
|
||||||
@@ -336,8 +323,6 @@ inline void FastMutex::unlock()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifdef POCO_HAVE_STD_ATOMICS
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// SpinlockMutex
|
// SpinlockMutex
|
||||||
//
|
//
|
||||||
@@ -382,8 +367,6 @@ inline void SpinlockMutex::unlock()
|
|||||||
_flag.clear(std::memory_order_release);
|
_flag.clear(std::memory_order_release);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // POCO_HAVE_STD_ATOMICS
|
|
||||||
|
|
||||||
|
|
||||||
} // namespace Poco
|
} // namespace Poco
|
||||||
|
|
||||||
|
|||||||
@@ -51,8 +51,6 @@ FastMutex::~FastMutex()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifdef POCO_HAVE_STD_ATOMICS
|
|
||||||
|
|
||||||
SpinlockMutex::SpinlockMutex()
|
SpinlockMutex::SpinlockMutex()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@@ -62,7 +60,5 @@ SpinlockMutex::~SpinlockMutex()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // POCO_HAVE_STD_ATOMICS
|
|
||||||
|
|
||||||
|
|
||||||
} // namespace Poco
|
} // namespace Poco
|
||||||
|
|||||||
Reference in New Issue
Block a user