diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2020-09-24 10:21:26 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2020-09-24 10:21:26 +0300 |
commit | 6ce0a6f9ad77e7934e27db1b73d6d98064352928 (patch) | |
tree | 351d7da0892c9a78310ffc39754c3ec4b38a188e /include | |
parent | b5c050563b1bfa1155b3b6a3b7c0c59775e77f13 (diff) | |
parent | 882ce206dbf06b771ffe4cbce2e3e4214982f302 (diff) | |
download | mariadb-git-6ce0a6f9ad77e7934e27db1b73d6d98064352928.tar.gz |
Merge 10.5 into 10.6
Diffstat (limited to 'include')
-rw-r--r-- | include/my_atomic_wrapper.h | 2 | ||||
-rw-r--r-- | include/my_cpu.h | 4 | ||||
-rw-r--r-- | include/my_sys.h | 14 | ||||
-rw-r--r-- | include/mysql/service_wsrep.h | 5 |
4 files changed, 14 insertions, 11 deletions
diff --git a/include/my_atomic_wrapper.h b/include/my_atomic_wrapper.h index 61db886d53f..64835e30ca7 100644 --- a/include/my_atomic_wrapper.h +++ b/include/my_atomic_wrapper.h @@ -48,6 +48,8 @@ public: { return m.fetch_add(i, o); } Type fetch_sub(const Type i, std::memory_order o= std::memory_order_relaxed) { return m.fetch_sub(i, o); } + Type fetch_xor(const Type i, std::memory_order o= std::memory_order_relaxed) + { return m.fetch_xor(i, o); } bool compare_exchange_strong(Type& i1, const Type i2, std::memory_order o1= std::memory_order_relaxed, std::memory_order o2= std::memory_order_relaxed) diff --git a/include/my_cpu.h b/include/my_cpu.h index fba04ccea66..e536ff285f9 100644 --- a/include/my_cpu.h +++ b/include/my_cpu.h @@ -53,6 +53,7 @@ #ifdef _WIN32 #elif defined HAVE_PAUSE_INSTRUCTION #elif defined(_ARCH_PWR8) +#elif defined __GNUC__ && (defined __arm__ || defined __aarch64__) #else # include "my_global.h" # include "my_atomic.h" @@ -81,6 +82,9 @@ static inline void MY_RELAX_CPU(void) #endif #elif defined(_ARCH_PWR8) __ppc_get_timebase(); +#elif defined __GNUC__ && (defined __arm__ || defined __aarch64__) + /* Mainly, prevent the compiler from optimizing away delay loops */ + __asm__ __volatile__ ("":::"memory"); #else int32 var, oldval = 0; my_atomic_cas32_strong_explicit(&var, &oldval, 1, MY_MEMORY_ORDER_RELAXED, diff --git a/include/my_sys.h b/include/my_sys.h index 68e52d13fff..dceae9b889e 100644 --- a/include/my_sys.h +++ b/include/my_sys.h @@ -905,18 +905,10 @@ extern int my_compress_buffer(uchar *dest, size_t *destLen, extern int packfrm(const uchar *, size_t, uchar **, size_t *); extern int unpackfrm(uchar **, size_t *, const uchar *); -void my_checksum_init(void); -#ifdef HAVE_CRC32_VPMSUM -extern ha_checksum my_checksum(ha_checksum, const void *, size_t); -#else -typedef ha_checksum (*my_crc32_t)(ha_checksum, const void *, size_t); -extern MYSQL_PLUGIN_IMPORT my_crc32_t my_checksum; -#endif +extern uint32 my_checksum(uint32, const void *, size_t); +extern uint32 my_crc32c(uint32, const void *, size_t); -#if defined(__GNUC__) && defined(HAVE_ARMV8_CRC) -int crc32_aarch64_available(void); -const char *crc32c_aarch64_available(void); -#endif +extern const char *my_crc32c_implementation(); #ifdef DBUG_ASSERT_EXISTS extern void my_debug_put_break_here(void); diff --git a/include/mysql/service_wsrep.h b/include/mysql/service_wsrep.h index 1b1d54c036b..f16331f1214 100644 --- a/include/mysql/service_wsrep.h +++ b/include/mysql/service_wsrep.h @@ -88,6 +88,8 @@ extern struct wsrep_service_st { my_bool (*wsrep_thd_has_ignored_error_func)(const MYSQL_THD thd); void (*wsrep_thd_set_ignored_error_func)(MYSQL_THD thd, my_bool val); bool (*wsrep_thd_set_wsrep_aborter_func)(MYSQL_THD bf_thd, MYSQL_THD thd); + void (*wsrep_report_bf_lock_wait_func)(const MYSQL_THD thd, + unsigned long long trx_id); } *wsrep_service; #define MYSQL_SERVICE_WSREP_INCLUDED @@ -132,6 +134,7 @@ extern struct wsrep_service_st { #define wsrep_thd_has_ignored_error(T) wsrep_service->wsrep_thd_has_ignored_error_func(T) #define wsrep_thd_set_ignored_error(T,V) wsrep_service->wsrep_thd_set_ignored_error_func(T,V) #define wsrep_thd_set_wsrep_aborter(T) wsrep_service->wsrep_thd_set_wsrep_aborter_func(T1, T2) +#define wsrep_report_bf_lock_wait(T,I) wsrep_service->wsrep_report_bf_lock_wait(T,I) #else #define MYSQL_SERVICE_WSREP_STATIC_INCLUDED @@ -229,5 +232,7 @@ extern "C" ulong wsrep_OSU_method_get(const MYSQL_THD thd); extern "C" my_bool wsrep_thd_has_ignored_error(const MYSQL_THD thd); extern "C" void wsrep_thd_set_ignored_error(MYSQL_THD thd, my_bool val); extern "C" bool wsrep_thd_set_wsrep_aborter(MYSQL_THD bf_thd, MYSQL_THD victim_thd); +extern "C" void wsrep_report_bf_lock_wait(const THD *thd, + unsigned long long trx_id); #endif #endif /* MYSQL_SERVICE_WSREP_INCLUDED */ |