Skip to content

Commit

Permalink
MDEV-11212 - Clean-up MariaDB atomic operations
Browse files Browse the repository at this point in the history
Removed MY_ATOMIC_HAS_8_16: never defined.
  • Loading branch information
Sergey Vojtovich committed Dec 13, 2016
1 parent 8f9999b commit bb99281
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 30 deletions.
2 changes: 0 additions & 2 deletions include/atomic/generic-msvc.h
Expand Up @@ -20,9 +20,7 @@
/*
We don't implement anything specific for MY_ATOMIC_MODE_DUMMY, always use
intrinsics.
8 and 16-bit atomics are not implemented, but it can be done if necessary.
*/
#undef MY_ATOMIC_HAS_8_16

#include <windows.h>
/*
Expand Down
28 changes: 0 additions & 28 deletions include/my_atomic.h
Expand Up @@ -99,17 +99,9 @@
MY_MEMORY_ORDER_SEQ_CST - The operation has the same semantics as
acquire-release operation, and additionally has
sequentially-consistent operation ordering.
8- and 16-bit atomics aren't implemented for windows (see generic-msvc.h),
but can be added, if necessary.
*/

#define intptr void *
/**
Currently we don't support 8-bit and 16-bit operations.
It can be added later if needed.
*/
#undef MY_ATOMIC_HAS_8_16

/*
We choose implementation as follows:
Expand Down Expand Up @@ -253,41 +245,21 @@ static inline void my_atomic_store ## S( \
make_atomic_store_body(S); \
}

#ifdef MY_ATOMIC_HAS_8_16
make_atomic_cas(8)
make_atomic_cas(16)
#endif
make_atomic_cas(32)
make_atomic_cas(64)
make_atomic_cas(ptr)

#ifdef MY_ATOMIC_HAS_8_16
make_atomic_add(8)
make_atomic_add(16)
#endif
make_atomic_add(32)
make_atomic_add(64)

#ifdef MY_ATOMIC_HAS_8_16
make_atomic_load(8)
make_atomic_load(16)
#endif
make_atomic_load(32)
make_atomic_load(64)
make_atomic_load(ptr)

#ifdef MY_ATOMIC_HAS_8_16
make_atomic_fas(8)
make_atomic_fas(16)
#endif
make_atomic_fas(32)
make_atomic_fas(64)
make_atomic_fas(ptr)

#ifdef MY_ATOMIC_HAS_8_16
make_atomic_store(8)
make_atomic_store(16)
#endif
make_atomic_store(32)
make_atomic_store(64)
make_atomic_store(ptr)
Expand Down

0 comments on commit bb99281

Please sign in to comment.