diff --git a/Foundation/include/Poco/Mutex.h b/Foundation/include/Poco/Mutex.h index 5070ab37a..b6f84aa56 100644 --- a/Foundation/include/Poco/Mutex.h +++ b/Foundation/include/Poco/Mutex.h @@ -22,16 +22,7 @@ #include "Poco/Exception.h" #include "Poco/ScopedLock.h" #include "Poco/Timestamp.h" - -#if __cplusplus >= 201103L - #ifndef POCO_HAVE_STD_ATOMICS - #define POCO_HAVE_STD_ATOMICS - #endif -#endif - -#ifdef POCO_HAVE_STD_ATOMICS - #include -#endif +#include #if defined(POCO_OS_FAMILY_WINDOWS) @@ -161,8 +152,6 @@ private: }; -#ifdef POCO_HAVE_STD_ATOMICS - class Foundation_API SpinlockMutex /// A SpinlockMutex, implemented in terms of std::atomic_flag, as /// busy-wait mutual exclusion. @@ -210,8 +199,6 @@ private: std::atomic_flag _flag = ATOMIC_FLAG_INIT; }; -#endif // POCO_HAVE_STD_ATOMICS - class Foundation_API NullMutex /// A NullMutex is an empty mutex implementation @@ -336,8 +323,6 @@ inline void FastMutex::unlock() } -#ifdef POCO_HAVE_STD_ATOMICS - // // SpinlockMutex // @@ -382,8 +367,6 @@ inline void SpinlockMutex::unlock() _flag.clear(std::memory_order_release); } -#endif // POCO_HAVE_STD_ATOMICS - } // namespace Poco diff --git a/Foundation/src/Mutex.cpp b/Foundation/src/Mutex.cpp index 362a41533..843562aff 100644 --- a/Foundation/src/Mutex.cpp +++ b/Foundation/src/Mutex.cpp @@ -51,8 +51,6 @@ FastMutex::~FastMutex() } -#ifdef POCO_HAVE_STD_ATOMICS - SpinlockMutex::SpinlockMutex() { } @@ -62,7 +60,5 @@ SpinlockMutex::~SpinlockMutex() { } -#endif // POCO_HAVE_STD_ATOMICS - } // namespace Poco