MySQL 9.1.0
Source Code Documentation
Collaboration diagram for Mutex Instrumentation (API):

Classes

struct  mysql_mutex_t
 An instrumented mutex structure. More...
 

Macros

#define mysql_mutex_assert_owner(M)    {}
 Wrapper, to use safe_mutex_assert_owner with instrumented mutexes. More...
 
#define mysql_mutex_assert_not_owner(M)    {}
 Wrapper, to use safe_mutex_assert_not_owner with instrumented mutexes. More...
 
#define mysql_mutex_register(P1, P2, P3)   inline_mysql_mutex_register(P1, P2, P3)
 Mutex registration. More...
 
#define mysql_mutex_init(K, M, A)    mysql_mutex_init_with_src(K, M, A, __FILE__, __LINE__)
 Instrumented mutex_init. More...
 
#define mysql_mutex_init_with_src(K, M, A, F, L)    inline_mysql_mutex_init(K, M, A, F, L)
 
#define mysql_mutex_destroy(M)    mysql_mutex_destroy_with_src(M, __FILE__, __LINE__)
 Instrumented mutex_destroy. More...
 
#define mysql_mutex_destroy_with_src(M, F, L)    inline_mysql_mutex_destroy(M, F, L)
 
#define mysql_mutex_lock(M)   mysql_mutex_lock_with_src(M, __FILE__, __LINE__)
 Instrumented mutex_lock. More...
 
#define mysql_mutex_lock_with_src(M, F, L)   inline_mysql_mutex_lock(M, F, L)
 
#define mysql_mutex_trylock(M)    mysql_mutex_trylock_with_src(M, __FILE__, __LINE__)
 Instrumented mutex_lock. More...
 
#define mysql_mutex_trylock_with_src(M, F, L)    inline_mysql_mutex_trylock(M, F, L)
 
#define mysql_mutex_unlock(M)   mysql_mutex_unlock_with_src(M, __FILE__, __LINE__)
 Instrumented mutex_unlock. More...
 
#define mysql_mutex_unlock_with_src(M, F, L)   inline_mysql_mutex_unlock(M, F, L)
 

Functions

static void inline_mysql_mutex_register (const char *category, PSI_mutex_info *info, int count)
 
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)
 
static int inline_mysql_mutex_destroy (mysql_mutex_t *that, const char *src_file, uint src_line)
 
static int inline_mysql_mutex_lock (mysql_mutex_t *that, const char *src_file, uint src_line)
 
static int inline_mysql_mutex_trylock (mysql_mutex_t *that, const char *src_file, uint src_line)
 
static int inline_mysql_mutex_unlock (mysql_mutex_t *that, const char *src_file, uint src_line)
 

Detailed Description

Macro Definition Documentation

◆ mysql_mutex_assert_not_owner

#define mysql_mutex_assert_not_owner (   M)     {}

Wrapper, to use safe_mutex_assert_not_owner with instrumented mutexes.

mysql_mutex_assert_not_owner is a drop-in replacement for safe_mutex_assert_not_owner.

◆ mysql_mutex_assert_owner

#define mysql_mutex_assert_owner (   M)     {}

Wrapper, to use safe_mutex_assert_owner with instrumented mutexes.

mysql_mutex_assert_owner is a drop-in replacement for safe_mutex_assert_owner.

◆ mysql_mutex_destroy

#define mysql_mutex_destroy (   M)     mysql_mutex_destroy_with_src(M, __FILE__, __LINE__)

Instrumented mutex_destroy.

mysql_mutex_destroy is a drop-in replacement for pthread_mutex_destroy.

◆ mysql_mutex_destroy_with_src

#define mysql_mutex_destroy_with_src (   M,
  F,
  L 
)     inline_mysql_mutex_destroy(M, F, L)

◆ mysql_mutex_init

#define mysql_mutex_init (   K,
  M,
 
)     mysql_mutex_init_with_src(K, M, A, __FILE__, __LINE__)

Instrumented mutex_init.

mysql_mutex_init is a replacement for pthread_mutex_init.

Parameters
KThe PSI_mutex_key for this instrumented mutex
MThe mutex to initialize
AMutex attributes

◆ mysql_mutex_init_with_src

#define mysql_mutex_init_with_src (   K,
  M,
  A,
  F,
  L 
)     inline_mysql_mutex_init(K, M, A, F, L)

◆ mysql_mutex_lock

#define mysql_mutex_lock (   M)    mysql_mutex_lock_with_src(M, __FILE__, __LINE__)

Instrumented mutex_lock.

mysql_mutex_lock is a drop-in replacement for pthread_mutex_lock.

Parameters
MThe mutex to lock

◆ mysql_mutex_lock_with_src

#define mysql_mutex_lock_with_src (   M,
  F,
  L 
)    inline_mysql_mutex_lock(M, F, L)

◆ mysql_mutex_register

#define mysql_mutex_register (   P1,
  P2,
  P3 
)    inline_mysql_mutex_register(P1, P2, P3)

Mutex registration.

◆ mysql_mutex_trylock

#define mysql_mutex_trylock (   M)     mysql_mutex_trylock_with_src(M, __FILE__, __LINE__)

Instrumented mutex_lock.

mysql_mutex_trylock is a drop-in replacement for my_mutex_trylock.

◆ mysql_mutex_trylock_with_src

#define mysql_mutex_trylock_with_src (   M,
  F,
  L 
)     inline_mysql_mutex_trylock(M, F, L)

◆ mysql_mutex_unlock

#define mysql_mutex_unlock (   M)    mysql_mutex_unlock_with_src(M, __FILE__, __LINE__)

Instrumented mutex_unlock.

mysql_mutex_unlock is a drop-in replacement for pthread_mutex_unlock.

◆ mysql_mutex_unlock_with_src

#define mysql_mutex_unlock_with_src (   M,
  F,
  L 
)    inline_mysql_mutex_unlock(M, F, L)

Function Documentation

◆ inline_mysql_mutex_destroy()

static int inline_mysql_mutex_destroy ( mysql_mutex_t that,
const char *  src_file,
uint  src_line 
)
inlinestatic

◆ inline_mysql_mutex_init()

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 
)
inlinestatic

◆ inline_mysql_mutex_lock()

static int inline_mysql_mutex_lock ( mysql_mutex_t that,
const char *  src_file,
uint  src_line 
)
inlinestatic

◆ inline_mysql_mutex_register()

static void inline_mysql_mutex_register ( const char *  category,
PSI_mutex_info info,
int  count 
)
inlinestatic

◆ inline_mysql_mutex_trylock()

static int inline_mysql_mutex_trylock ( mysql_mutex_t that,
const char *  src_file,
uint  src_line 
)
inlinestatic

◆ inline_mysql_mutex_unlock()

static int inline_mysql_mutex_unlock ( mysql_mutex_t that,
const char *  src_file,
uint  src_line 
)
inlinestatic