diff options
author | Sergei Golubchik <serg@mariadb.org> | 2015-01-12 17:03:45 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2015-01-13 10:15:21 +0100 |
commit | e695db0f2d97cbba2832e0f3dc25af5add1f16ac (patch) | |
tree | 7c03822a83a0b16ae513b22659b9ac43068b0411 /include/my_atomic.h | |
parent | 1f0ad6c6b3421a815ea6373c66aaf693852342cf (diff) | |
download | mariadb-git-e695db0f2d97cbba2832e0f3dc25af5add1f16ac.tar.gz |
MDEV-7437 remove suport for "atomics" with rwlocks
Diffstat (limited to 'include/my_atomic.h')
-rw-r--r-- | include/my_atomic.h | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/include/my_atomic.h b/include/my_atomic.h index da075303578..c75b65db38d 100644 --- a/include/my_atomic.h +++ b/include/my_atomic.h @@ -100,20 +100,10 @@ acquire-release operation, and additionally has sequentially-consistent operation ordering. - NOTE This operations are not always atomic, so they always must be - enclosed in my_atomic_rwlock_rdlock(lock)/my_atomic_rwlock_rdunlock(lock) - or my_atomic_rwlock_wrlock(lock)/my_atomic_rwlock_wrunlock(lock). - Hint: if a code block makes intensive use of atomic ops, it make sense - to take/release rwlock once for the whole block, not for every statement. - - On architectures where these operations are really atomic, rwlocks will - be optimized away. 8- and 16-bit atomics aren't implemented for windows (see generic-msvc.h), but can be added, if necessary. */ -#ifndef my_atomic_rwlock_init - #define intptr void * /** Currently we don't support 8-bit and 16-bit operations. @@ -121,16 +111,14 @@ */ #undef MY_ATOMIC_HAS_8_16 -#ifndef MY_ATOMIC_MODE_RWLOCKS /* * Attempt to do atomic ops without locks */ #include "atomic/nolock.h" -#endif #ifndef make_atomic_cas_body /* nolock.h was not able to generate even a CAS function, fall back */ -#include "atomic/rwlock.h" +#error atomic ops for this platform are not implemented #endif /* define missing functions by using the already generated ones */ @@ -340,8 +328,6 @@ make_atomic_store(ptr) #define MY_ATOMIC_NOT_1CPU 1 extern int my_atomic_initialize(); -#endif - #ifdef __ATOMIC_SEQ_CST #define MY_MEMORY_ORDER_RELAXED __ATOMIC_RELAXED #define MY_MEMORY_ORDER_CONSUME __ATOMIC_CONSUME |