fix(SpinlockMutex): VS2022 compilation issues #3693

This commit is contained in:
Alex Fabijanic
2022-07-27 16:19:06 -04:00
parent 3a39fa5319
commit 10dfe9fe92
2 changed files with 1 additions and 22 deletions

View File

@@ -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 <atomic>
#endif
#include <atomic>
#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