diff options
author | Sergey Vojtovich <svoj@mariadb.org> | 2016-11-02 15:40:30 +0400 |
---|---|---|
committer | Sergey Vojtovich <svoj@mariadb.org> | 2016-12-13 16:38:20 +0400 |
commit | 8ff3b892aeac2e320d701652539476c4d9e7b591 (patch) | |
tree | a0bd6c706e3ace95ac0abf99253ac73a72da9572 /include/atomic | |
parent | bb9928160fce03c64bbf753e7eafbdbd95255110 (diff) | |
download | mariadb-git-8ff3b892aeac2e320d701652539476c4d9e7b591.tar.gz |
MDEV-11212 - Clean-up MariaDB atomic operations
Removed MY_ATOMIC_MODE_DUMMY and WITH_ATOMIC_OPS: MariaDB is not functional
without atomic operations anymore.
Diffstat (limited to 'include/atomic')
-rw-r--r-- | include/atomic/gcc_builtins.h | 7 | ||||
-rw-r--r-- | include/atomic/generic-msvc.h | 5 | ||||
-rw-r--r-- | include/atomic/solaris.h | 9 |
3 files changed, 1 insertions, 20 deletions
diff --git a/include/atomic/gcc_builtins.h b/include/atomic/gcc_builtins.h index 56a0323aedf..03472ec943c 100644 --- a/include/atomic/gcc_builtins.h +++ b/include/atomic/gcc_builtins.h @@ -26,12 +26,7 @@ sav= __sync_val_compare_and_swap(a, cmp_val, set);\ if (!(ret= (sav == cmp_val))) *cmp= sav -#ifdef MY_ATOMIC_MODE_DUMMY -#define make_atomic_load_body(S) ret= *a -#define make_atomic_store_body(S) *a= v -#define MY_ATOMIC_MODE "gcc-builtins-up" - -#elif defined(HAVE_GCC_C11_ATOMICS) +#if defined(HAVE_GCC_C11_ATOMICS) #define MY_ATOMIC_MODE "gcc-atomics-smp" #define make_atomic_load_body(S) \ ret= __atomic_load_n(a, __ATOMIC_SEQ_CST) diff --git a/include/atomic/generic-msvc.h b/include/atomic/generic-msvc.h index 2684a38b331..d06229ce5ef 100644 --- a/include/atomic/generic-msvc.h +++ b/include/atomic/generic-msvc.h @@ -17,11 +17,6 @@ #ifndef _atomic_h_cleanup_ #define _atomic_h_cleanup_ "atomic/generic-msvc.h" -/* - We don't implement anything specific for MY_ATOMIC_MODE_DUMMY, always use - intrinsics. -*/ - #include <windows.h> /* x86 compilers (both VS2003 or VS2005) never use instrinsics, but generate diff --git a/include/atomic/solaris.h b/include/atomic/solaris.h index 7b6f0561ff0..578e7c46c7c 100644 --- a/include/atomic/solaris.h +++ b/include/atomic/solaris.h @@ -45,21 +45,12 @@ /* ------------------------------------------------------------------------ */ -#ifdef MY_ATOMIC_MODE_DUMMY - -#define make_atomic_load_body(S) ret= *a -#define make_atomic_store_body(S) *a= v - -#else /* MY_ATOMIC_MODE_DUMMY */ - #define make_atomic_load_body(S) \ ret= atomic_or_ ## S ## _nv((volatile uint ## S ## _t *)a, 0) #define make_atomic_store_body(S) \ (void) atomic_swap_ ## S((volatile uint ## S ## _t *)a, (uint ## S ## _t)v) -#endif - #define make_atomic_fas_body(S) \ v= atomic_swap_ ## S((volatile uint ## S ## _t *)a, (uint ## S ## _t)v) |