Fix to make mxtasking compilable with gcc.

This commit is contained in:
Michael Mueller
2024-07-23 16:27:49 +02:00
parent 4ee2b58379
commit 7b8735c721

View File

@@ -6,8 +6,8 @@ namespace mx::util {
/**
* The maybe_atomic<T> makes T atomic in ARM hardware but none-atomic on x86_64.
*/
#if defined(__x86_64__) && (!defined(__has_feature) || !__has_feature(thread_sanitizer))
template <typename T> using maybe_atomic = T;
#if defined(__x86_64__) && (!defined(__has_feature)) //|| !__has_feature(thread_sanitizer))
template <typename T> using maybe_atomic = std::atomic<T>;
#else
template <typename T> using maybe_atomic = std::atomic<T>;
#endif