MySQL 9.1.0
Source Code Documentation
|
A class to allow any trivially copyable object to be XOR'ed. More...
#include <os0thread.h>
Public Member Functions | |
Atomic_xor_of_things () | |
void | xor_thing (T_thing id) |
T_thing | recover_if_single () |
Returns an object that was XOR'ed odd number of times. More... | |
Private Attributes | |
std::array< std::atomic< T_digit >, digits_count > | acc |
Static Private Attributes | |
static constexpr size_t | digits_count |
A class to allow any trivially copyable object to be XOR'ed.
Trivially copyable according to https://en.cppreference.com/w/cpp/named_req/TriviallyCopyable means we can copy the underlying representation to array of chars, and back and consider it a valid copy. It is thread-safe when changing, but no modifications must be assured during reading the stored value.
|
inline |
|
inline |
Returns an object that was XOR'ed odd number of times.
This function assumes there is exactly one such object, and caller must assure this. This method is not thread-safe and caller must ensure no other thread is trying to modify the value.
|
inline |
|
private |
|
staticconstexprprivate |