WL#7607: Refactor atomics implementation
The objective of this worklog is to refactor the existing atomics implementation. The current implementation is hard to read and reason about as it consists of layers of macroes with macro defintions split between different files. The current implementation also contains obsolete workarounds e.g. for older compilers. After the refactoring, the atomic operations will be implemented using self-contained static inline functions. This WL will also remove the MY_ATOMIC_MODE_DUMMY CMake parameter. When the server is built with this mode set, the atomics implementation is disabled. Making them into normal additions, comparisons etc. It is meant for single core, single CPU machines. This is not very relevant anymore. Also, building performance schema is not possible with MY_ATOMIC_MODE_DUMMY set. The worklog will have no user-visible changes. The atomics API will also remain unchanged, so there will be no changes required in the rest of the server code.
NF-1: Refactoring with no changes required to server code and no performance implications.
I-1: The MY_ATOMIC_MODE_DUMMY CMake parameter will be removed. It is obsolete, and prevents compilation of performance schema.
Refactoring plan: - Remove macros, have self-contained static inline functions. gcc_builtins.h, generic-msvc.h, rwlock.h and solaris.h will each contain the full details about each of our native atomics implementations. - Remove nolock.h, move contents into my_atomics.h - Remove MY_ATOMIC_MODE_DUMMY and MY_ATOMIC_MODE - make_transparent_unions() does not seem to be needed anymore - 32 bit MSVC workaround does not seem to be needed anymore - workaround for VS earlier than 2010 is not needed anymore
Copyright (c) 2000, 2019, Oracle Corporation and/or its affiliates. All rights reserved.