mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
amd64 atomic ops
lock-free alloc (WL#3229), lock-free hash (WL#3230) bit functions made inline include/Makefile.am: lf.h added mysys/Makefile.am: lf_hash.c lf_dynarray.c lf_alloc-pin.c include/atomic/nolock.h: amd64 atomic ops include/atomic/rwlock.h: s/rw_lock/mutex/g include/atomic/x86-gcc.h: amd64 atomic ops try PAUSE include/my_global.h: STATIC_INLINE mysys/mf_keycache.c: make bit functions inline mysys/my_atomic.c: STATIC_INLINE mysys/my_bitmap.c: make bit functions inline sql/ha_myisam.cc: make bit functions inline sql/item_func.cc: make bit functions inline include/my_atomic.h: STATIC_INLINE mysys/my_bit.c: make bit functions inline sql/sql_select.cc: make bit functions inline storage/myisam/mi_create.c: make bit functions inline storage/myisam/mi_test2.c: make bit functions inline storage/myisam/myisamchk.c: make bit functions inline mysys/my_init.c: thread_size moved to mysys sql/mysql_priv.h: thread_size moved to mysys sql/set_var.cc: thread_size moved to mysys include/my_sys.h: thread_size moved to mysys sql/mysqld.cc: thread_size moved to mysys sql/sql_parse.cc: thread_size moved to mysys sql/sql_test.cc: thread_size moved to mysys include/lf.h: dylf_dynarray refactored to remove 65536 elements limit mysys/lf_alloc-pin.c: dylf_dynarray refactored to remove 65536 elements limit mysys/lf_dynarray.c: dylf_dynarray refactored to remove 65536 elements limit mysys/lf_hash.c: dylf_dynarray refactored to remove 65536 elements limit unittest/mysys/my_atomic-t.c: fix to commit (remove debug code)
This commit is contained in:
@@ -36,7 +36,7 @@
|
||||
#ifdef HAVE_INLINE
|
||||
|
||||
#define make_atomic_add(S) \
|
||||
static inline int ## S my_atomic_add ## S( \
|
||||
STATIC_INLINE int ## S my_atomic_add ## S( \
|
||||
int ## S volatile *a, int ## S v) \
|
||||
{ \
|
||||
make_atomic_add_body(S); \
|
||||
@@ -44,7 +44,7 @@ static inline int ## S my_atomic_add ## S( \
|
||||
}
|
||||
|
||||
#define make_atomic_swap(S) \
|
||||
static inline int ## S my_atomic_swap ## S( \
|
||||
STATIC_INLINE int ## S my_atomic_swap ## S( \
|
||||
int ## S volatile *a, int ## S v) \
|
||||
{ \
|
||||
make_atomic_swap_body(S); \
|
||||
@@ -52,7 +52,7 @@ static inline int ## S my_atomic_swap ## S( \
|
||||
}
|
||||
|
||||
#define make_atomic_cas(S) \
|
||||
static inline int my_atomic_cas ## S(int ## S volatile *a, \
|
||||
STATIC_INLINE int my_atomic_cas ## S(int ## S volatile *a, \
|
||||
int ## S *cmp, int ## S set) \
|
||||
{ \
|
||||
int8 ret; \
|
||||
@@ -61,7 +61,7 @@ static inline int my_atomic_cas ## S(int ## S volatile *a, \
|
||||
}
|
||||
|
||||
#define make_atomic_load(S) \
|
||||
static inline int ## S my_atomic_load ## S(int ## S volatile *a) \
|
||||
STATIC_INLINE int ## S my_atomic_load ## S(int ## S volatile *a) \
|
||||
{ \
|
||||
int ## S ret; \
|
||||
make_atomic_load_body(S); \
|
||||
@@ -69,7 +69,7 @@ static inline int ## S my_atomic_load ## S(int ## S volatile *a) \
|
||||
}
|
||||
|
||||
#define make_atomic_store(S) \
|
||||
static inline void my_atomic_store ## S( \
|
||||
STATIC_INLINE void my_atomic_store ## S( \
|
||||
int ## S volatile *a, int ## S v) \
|
||||
{ \
|
||||
make_atomic_store_body(S); \
|
||||
@@ -135,6 +135,10 @@ make_atomic_swap(ptr)
|
||||
#undef _atomic_h_cleanup_
|
||||
#endif
|
||||
|
||||
#ifndef LF_BACKOFF
|
||||
#define LF_BACKOFF (1)
|
||||
#endif
|
||||
|
||||
#if SIZEOF_CHARP == SIZEOF_INT
|
||||
typedef int intptr;
|
||||
#elif SIZEOF_CHARP == SIZEOF_LONG
|
||||
|
Reference in New Issue
Block a user