diff options
author | Davi Arnaut <davi.arnaut@oracle.com> | 2010-07-23 17:18:36 -0300 |
---|---|---|
committer | Davi Arnaut <davi.arnaut@oracle.com> | 2010-07-23 17:18:36 -0300 |
commit | ecd4a294a5d0ef4f0191993352bb0c1290e3c132 (patch) | |
tree | e39190b7222d99ca43735545cd66a9090e96e4ee /include/my_atomic.h | |
parent | e001970cc7ca527ea7e81647d2fe4b6b5afd4478 (diff) | |
download | mariadb-git-ecd4a294a5d0ef4f0191993352bb0c1290e3c132.tar.gz |
WL#5498: Remove dead and unused source code
Remove wrappers around inline -- static inline is used without
wrappers throughout the source code. We rely on the compiler or
linker to eliminate unused static functions.
Diffstat (limited to 'include/my_atomic.h')
-rw-r--r-- | include/my_atomic.h | 31 |
1 files changed, 5 insertions, 26 deletions
diff --git a/include/my_atomic.h b/include/my_atomic.h index a2f454ac319..c2d514012d9 100644 --- a/include/my_atomic.h +++ b/include/my_atomic.h @@ -155,10 +155,8 @@ make_transparent_unions(ptr) #define U_set set #endif /* __GCC__ transparent_union magic */ -#ifdef HAVE_INLINE - #define make_atomic_cas(S) \ -STATIC_INLINE int my_atomic_cas ## S(Uv_ ## S U_a, \ +static inline int my_atomic_cas ## S(Uv_ ## S U_a, \ Uv_ ## S U_cmp, U_ ## S U_set) \ { \ int8 ret; \ @@ -167,7 +165,7 @@ STATIC_INLINE int my_atomic_cas ## S(Uv_ ## S U_a, \ } #define make_atomic_add(S) \ -STATIC_INLINE int ## S my_atomic_add ## S( \ +static inline int ## S my_atomic_add ## S( \ Uv_ ## S U_a, U_ ## S U_v) \ { \ make_atomic_add_body(S); \ @@ -175,7 +173,7 @@ STATIC_INLINE int ## S my_atomic_add ## S( \ } #define make_atomic_fas(S) \ -STATIC_INLINE int ## S my_atomic_fas ## S( \ +static inline int ## S my_atomic_fas ## S( \ Uv_ ## S U_a, U_ ## S U_v) \ { \ make_atomic_fas_body(S); \ @@ -183,7 +181,7 @@ STATIC_INLINE int ## S my_atomic_fas ## S( \ } #define make_atomic_load(S) \ -STATIC_INLINE int ## S my_atomic_load ## S(Uv_ ## S U_a) \ +static inline int ## S my_atomic_load ## S(Uv_ ## S U_a) \ { \ int ## S ret; \ make_atomic_load_body(S); \ @@ -191,31 +189,12 @@ STATIC_INLINE int ## S my_atomic_load ## S(Uv_ ## S U_a) \ } #define make_atomic_store(S) \ -STATIC_INLINE void my_atomic_store ## S( \ +static inline void my_atomic_store ## S( \ Uv_ ## S U_a, U_ ## S U_v) \ { \ make_atomic_store_body(S); \ } -#else /* no inline functions */ - -#define make_atomic_add(S) \ -extern int ## S my_atomic_add ## S(Uv_ ## S U_a, U_ ## S U_v); - -#define make_atomic_fas(S) \ -extern int ## S my_atomic_fas ## S(Uv_ ## S U_a, U_ ## S U_v); - -#define make_atomic_cas(S) \ -extern int my_atomic_cas ## S(Uv_ ## S U_a, Uv_ ## S U_cmp, U_ ## S U_set); - -#define make_atomic_load(S) \ -extern int ## S my_atomic_load ## S(Uv_ ## S U_a); - -#define make_atomic_store(S) \ -extern void my_atomic_store ## S(Uv_ ## S U_a, U_ ## S U_v); - -#endif /* HAVE_INLINE */ - #ifdef MY_ATOMIC_HAS_8_16 make_atomic_cas(8) make_atomic_cas(16) |