mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-26 18:42:41 +01:00
fix(SpinlockMutex): VS2022 compilation issues #3693
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user