67#if defined(MYSQL_SERVER) || defined(PFS_DIRECT_CALL)
73#define PSI_MUTEX_CALL(M) psi_mutex_service->M
100#ifndef DISABLE_MYSQL_THREAD_H
109#define mysql_mutex_assert_owner(M) \
110 safe_mutex_assert_owner((M)->m_mutex.m_u.m_safe_ptr);
112#define mysql_mutex_assert_owner(M) \
123#define mysql_mutex_assert_not_owner(M) \
124 safe_mutex_assert_not_owner((M)->m_mutex.m_u.m_safe_ptr);
126#define mysql_mutex_assert_not_owner(M) \
134#define mysql_mutex_register(P1, P2, P3) inline_mysql_mutex_register(P1, P2, P3)
145#define mysql_mutex_init(K, M, A) \
146 mysql_mutex_init_with_src(K, M, A, __FILE__, __LINE__)
148#define mysql_mutex_init_with_src(K, M, A, F, L) \
149 inline_mysql_mutex_init(K, M, A, F, L)
157#define mysql_mutex_destroy(M) \
158 mysql_mutex_destroy_with_src(M, __FILE__, __LINE__)
160#define mysql_mutex_destroy_with_src(M, F, L) \
161 inline_mysql_mutex_destroy(M, F, L)
170#define mysql_mutex_lock(M) mysql_mutex_lock_with_src(M, __FILE__, __LINE__)
172#define mysql_mutex_lock_with_src(M, F, L) inline_mysql_mutex_lock(M, F, L)
181#define mysql_mutex_trylock(M) \
182 mysql_mutex_trylock_with_src(M, __FILE__, __LINE__)
184#define mysql_mutex_trylock_with_src(M, F, L) \
185 inline_mysql_mutex_trylock(M, F, L)
192#define mysql_mutex_unlock(M) mysql_mutex_unlock_with_src(M, __FILE__, __LINE__)
194#define mysql_mutex_unlock_with_src(M, F, L) inline_mysql_mutex_unlock(M, F, L)
200 int count [[maybe_unused]]) {
201#ifdef HAVE_PSI_MUTEX_INTERFACE
209 const char *src_file [[maybe_unused]],
210 uint src_line [[maybe_unused]]) {
211#ifdef HAVE_PSI_MUTEX_INTERFACE
214 that->
m_psi =
nullptr;
227 uint src_line [[maybe_unused]]) {
228#ifdef HAVE_PSI_MUTEX_INTERFACE
229 if (that->
m_psi !=
nullptr) {
231 that->
m_psi =
nullptr;
243 const char *src_file [[maybe_unused]],
244 uint src_line [[maybe_unused]]) {
247#ifdef HAVE_PSI_MUTEX_INTERFACE
248 if (that->
m_psi !=
nullptr) {
265 if (locker !=
nullptr) {
288 uint src_line [[maybe_unused]]) {
291#ifdef HAVE_PSI_MUTEX_INTERFACE
292 if (that->
m_psi !=
nullptr) {
309 if (locker !=
nullptr) {
332 uint src_line [[maybe_unused]]) {
335#ifdef HAVE_PSI_MUTEX_INTERFACE
336 if (that->
m_psi !=
nullptr) {
#define PSI_MUTEX_CALL(M)
Definition: psi_mutex.h:36
struct PSI_mutex_locker PSI_mutex_locker
Definition: psi_mutex_bits.h:105
unsigned int PSI_mutex_key
Instrumented mutex key.
Definition: psi_mutex_bits.h:52
@ PSI_MUTEX_TRYLOCK
Lock attempt.
Definition: psi_mutex_bits.h:112
@ PSI_MUTEX_LOCK
Lock.
Definition: psi_mutex_bits.h:110
static void inline_mysql_mutex_register(const char *category, PSI_mutex_info *info, int count)
Definition: mysql_mutex.h:196
static int inline_mysql_mutex_destroy(mysql_mutex_t *that, const char *src_file, uint src_line)
Definition: mysql_mutex.h:224
static int inline_mysql_mutex_init(PSI_mutex_key key, mysql_mutex_t *that, const native_mutexattr_t *attr, const char *src_file, uint src_line)
Definition: mysql_mutex.h:206
static int inline_mysql_mutex_unlock(mysql_mutex_t *that, const char *src_file, uint src_line)
Definition: mysql_mutex.h:329
static int inline_mysql_mutex_lock(mysql_mutex_t *that, const char *src_file, uint src_line)
Definition: mysql_mutex.h:242
static int inline_mysql_mutex_trylock(mysql_mutex_t *that, const char *src_file, uint src_line)
Definition: mysql_mutex.h:285
Defines various enable/disable and HAVE_ macros related to the performance schema instrumentation sys...
static int count
Definition: myisam_ftdump.cc:45
ABI for instrumented mutexes.
native_mutex_t init_mutex
Definition: mysqlimport.cc:59
static const char * category
Definition: sha2_password.cc:170
Performance schema instrumentation (declarations).
struct result result
Definition: result.h:34
Performance schema instrumentation interface.
Instrumentation helpers for mutexes.
required string key
Definition: replication_asynchronous_connection_failover.proto:60
bool m_enabled
Instrumentation is enabled.
Definition: psi_bits.h:191
Mutex information.
Definition: psi_mutex_bits.h:73
State data storage for start_mutex_wait_v1_t.
Definition: psi_mutex_bits.h:125
An instrumented mutex structure.
Definition: mysql_mutex_bits.h:50
struct PSI_mutex * m_psi
The instrumentation hook.
Definition: mysql_mutex_bits.h:58
my_mutex_t m_mutex
The real mutex.
Definition: mysql_mutex_bits.h:52
MySQL mutex implementation.
static int my_mutex_init(my_mutex_t *mp, const native_mutexattr_t *attr)
Definition: thr_mutex.h:165
static int my_mutex_destroy(my_mutex_t *mp)
Definition: thr_mutex.h:225
static int my_mutex_lock(my_mutex_t *mp)
Definition: thr_mutex.h:180
static int my_mutex_trylock(my_mutex_t *mp)
Definition: thr_mutex.h:195
static int my_mutex_unlock(my_mutex_t *mp)
Definition: thr_mutex.h:210
pthread_mutexattr_t native_mutexattr_t
Definition: thr_mutex_bits.h:56