![]() |
MySQL 8.0.40
Source Code Documentation
|
Lock-free type (selection) implementation. More...
#include <atomic>
#include <type_traits>
#include "my_config.h"
#include "storage/temptable/include/temptable/constants.h"
Go to the source code of this file.
Namespaces | |
namespace | temptable |
Macros | |
#define | WORKAROUND_PR31864_CLANG_BUG (0) |
Clang has a bug which causes ATOMIC_LLONG_LOCK_FREE to be defined as 1 (or "sometimes lock-free") in 32-bit builds even though __atomic_always_lock_free returns true for the same type on the same platform. More... | |
Enumerations | |
enum class | temptable::Alignment { temptable::NATURAL , temptable::L1_DCACHE_SIZE } |
Enum class describing alignment-requirements. More... | |
Lock-free type (selection) implementation.
#define WORKAROUND_PR31864_CLANG_BUG (0) |
Clang has a bug which causes ATOMIC_LLONG_LOCK_FREE to be defined as 1 (or "sometimes lock-free") in 32-bit builds even though __atomic_always_lock_free returns true for the same type on the same platform.
This is an inconsistency which can be easily verified by:
% clang -dM -E -x c /dev/null | grep LLONG_LOCK define __CLANG_ATOMIC_LLONG_LOCK_FREE 2 define __GCC_ATOMIC_LLONG_LOCK_FREE 2
% clang -m32 -dM -E -x c /dev/null | grep LLONG_LOCK define __CLANG_ATOMIC_LLONG_LOCK_FREE 1 define __GCC_ATOMIC_LLONG_LOCK_FREE 1
% gcc -dM -E -x c /dev/null | grep LLONG_LOCK define __GCC_ATOMIC_LLONG_LOCK_FREE 2
% gcc -m32 -dM -E -x c /dev/null | grep LLONG_LOCK define __GCC_ATOMIC_LLONG_LOCK_FREE 2
There has been some work towards fixing this issue:
Some more links: