MySQL 5.6.14 Source Code Document
|
Classes | |
struct | st_mysql_mutex |
struct | st_mysql_rwlock |
struct | st_mysql_prlock |
struct | st_mysql_cond |
Macros | |
#define | mysql_mutex_assert_owner(M) safe_mutex_assert_owner(&(M)->m_mutex) |
#define | mysql_mutex_assert_not_owner(M) safe_mutex_assert_not_owner(&(M)->m_mutex) |
#define | mysql_prlock_assert_write_owner(M) rw_pr_lock_assert_write_owner(&(M)->m_prlock) |
#define | mysql_prlock_assert_not_write_owner(M) rw_pr_lock_assert_not_write_owner(&(M)->m_prlock) |
#define | mysql_mutex_register(P1, P2, P3) inline_mysql_mutex_register(P1, P2, P3) |
#define | mysql_mutex_init(K, M, A) inline_mysql_mutex_init(M, A) |
#define | mysql_mutex_destroy(M) inline_mysql_mutex_destroy(M) |
#define | mysql_mutex_lock(M) inline_mysql_mutex_lock(M) |
#define | mysql_mutex_trylock(M) inline_mysql_mutex_trylock(M) |
#define | mysql_mutex_unlock(M) inline_mysql_mutex_unlock(M) |
#define | mysql_rwlock_register(P1, P2, P3) inline_mysql_rwlock_register(P1, P2, P3) |
#define | mysql_rwlock_init(K, RW) inline_mysql_rwlock_init(RW) |
#define | mysql_prlock_init(K, RW) inline_mysql_prlock_init(RW) |
#define | mysql_rwlock_destroy(RW) inline_mysql_rwlock_destroy(RW) |
#define | mysql_prlock_destroy(RW) inline_mysql_prlock_destroy(RW) |
#define | mysql_rwlock_rdlock(RW) inline_mysql_rwlock_rdlock(RW) |
#define | mysql_prlock_rdlock(RW) inline_mysql_prlock_rdlock(RW) |
#define | mysql_rwlock_wrlock(RW) inline_mysql_rwlock_wrlock(RW) |
#define | mysql_prlock_wrlock(RW) inline_mysql_prlock_wrlock(RW) |
#define | mysql_rwlock_tryrdlock(RW) inline_mysql_rwlock_tryrdlock(RW) |
#define | mysql_rwlock_trywrlock(RW) inline_mysql_rwlock_trywrlock(RW) |
#define | mysql_rwlock_unlock(RW) inline_mysql_rwlock_unlock(RW) |
#define | mysql_prlock_unlock(RW) inline_mysql_prlock_unlock(RW) |
#define | mysql_cond_register(P1, P2, P3) inline_mysql_cond_register(P1, P2, P3) |
#define | mysql_cond_init(K, C, A) inline_mysql_cond_init(C, A) |
#define | mysql_cond_destroy(C) inline_mysql_cond_destroy(C) |
#define | mysql_cond_wait(C, M) inline_mysql_cond_wait(C, M) |
#define | mysql_cond_timedwait(C, M, W) inline_mysql_cond_timedwait(C, M, W) |
#define | mysql_cond_signal(C) inline_mysql_cond_signal(C) |
#define | mysql_cond_broadcast(C) inline_mysql_cond_broadcast(C) |
#define | mysql_thread_register(P1, P2, P3) inline_mysql_thread_register(P1, P2, P3) |
#define | mysql_thread_create(K, P1, P2, P3, P4) pthread_create(P1, P2, P3, P4) |
#define | mysql_thread_set_psi_id(I) do {} while (0) |
Typedefs | |
typedef struct st_mysql_mutex | mysql_mutex_t |
typedef struct st_mysql_rwlock | mysql_rwlock_t |
typedef struct st_mysql_prlock | mysql_prlock_t |
typedef struct st_mysql_cond | mysql_cond_t |
#define mysql_cond_broadcast | ( | C | ) | inline_mysql_cond_broadcast(C) |
Instrumented cond_broadcast. mysql_cond_broadcast
is a drop-in replacement for pthread_cond_broadcast
.
Definition at line 539 of file mysql_thread.h.
#define mysql_cond_destroy | ( | C | ) | inline_mysql_cond_destroy(C) |
Instrumented cond_destroy. mysql_cond_destroy
is a drop-in replacement for pthread_cond_destroy
.
Definition at line 497 of file mysql_thread.h.
Instrumented cond_init. mysql_cond_init
is a replacement for pthread_cond_init
.
C | The cond to initialize |
K | The PSI_cond_key for this instrumented cond |
A | Condition attributes |
Definition at line 489 of file mysql_thread.h.
#define mysql_cond_register | ( | P1, | |
P2, | |||
P3 | |||
) | inline_mysql_cond_register(P1, P2, P3) |
Cond registration.
Definition at line 475 of file mysql_thread.h.
#define mysql_cond_signal | ( | C | ) | inline_mysql_cond_signal(C) |
Instrumented cond_signal. mysql_cond_signal
is a drop-in replacement for pthread_cond_signal
.
Definition at line 531 of file mysql_thread.h.
#define mysql_cond_timedwait | ( | C, | |
M, | |||
W | |||
) | inline_mysql_cond_timedwait(C, M, W) |
Instrumented cond_timedwait. mysql_cond_timedwait
is a drop-in replacement for pthread_cond_timedwait
.
Definition at line 522 of file mysql_thread.h.
#define mysql_cond_wait | ( | C, | |
M | |||
) | inline_mysql_cond_wait(C, M) |
Instrumented cond_wait. mysql_cond_wait
is a drop-in replacement for pthread_cond_wait
.
Definition at line 508 of file mysql_thread.h.
#define mysql_mutex_assert_not_owner | ( | M | ) | safe_mutex_assert_not_owner(&(M)->m_mutex) |
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
.
Definition at line 219 of file mysql_thread.h.
#define mysql_mutex_assert_owner | ( | M | ) | safe_mutex_assert_owner(&(M)->m_mutex) |
Wrapper, to use safe_mutex_assert_owner with instrumented mutexes. mysql_mutex_assert_owner
is a drop-in replacement for safe_mutex_assert_owner
.
Definition at line 210 of file mysql_thread.h.
#define mysql_mutex_destroy | ( | M | ) | inline_mysql_mutex_destroy(M) |
Instrumented mutex_destroy. mysql_mutex_destroy
is a drop-in replacement for pthread_mutex_destroy
.
Definition at line 274 of file mysql_thread.h.
Instrumented mutex_init. mysql_mutex_init
is a replacement for pthread_mutex_init
.
K | The PSI_mutex_key for this instrumented mutex |
M | The mutex to initialize |
A | Mutex attributes |
Definition at line 259 of file mysql_thread.h.
#define mysql_mutex_lock | ( | M | ) | inline_mysql_mutex_lock(M) |
Instrumented mutex_lock. mysql_mutex_lock
is a drop-in replacement for pthread_mutex_lock
.
M | The mutex to lock |
Definition at line 289 of file mysql_thread.h.
#define mysql_mutex_register | ( | P1, | |
P2, | |||
P3 | |||
) | inline_mysql_mutex_register(P1, P2, P3) |
Mutex registration.
Definition at line 234 of file mysql_thread.h.
#define mysql_mutex_trylock | ( | M | ) | inline_mysql_mutex_trylock(M) |
Instrumented mutex_lock. mysql_mutex_trylock
is a drop-in replacement for pthread_mutex_trylock
.
Definition at line 304 of file mysql_thread.h.
#define mysql_mutex_unlock | ( | M | ) | inline_mysql_mutex_unlock(M) |
Instrumented mutex_unlock. mysql_mutex_unlock
is a drop-in replacement for pthread_mutex_unlock
.
Definition at line 317 of file mysql_thread.h.
#define mysql_prlock_assert_write_owner | ( | M | ) | rw_pr_lock_assert_write_owner(&(M)->m_prlock) |
Wrappers for instrumented prlock objects.
Definition at line 224 of file mysql_thread.h.
#define mysql_prlock_destroy | ( | RW | ) | inline_mysql_prlock_destroy(RW) |
Instrumented rw_pr_destroy. mysql_prlock_destroy
is a drop-in replacement for rw_pr_destroy
.
Definition at line 369 of file mysql_thread.h.
#define mysql_prlock_init | ( | K, | |
RW | |||
) | inline_mysql_prlock_init(RW) |
Instrumented rw_pr_init. mysql_prlock_init
is a replacement for rw_pr_init
.
K | The PSI_rwlock_key for this instrumented prlock |
RW | The prlock to initialize |
Definition at line 352 of file mysql_thread.h.
#define mysql_prlock_rdlock | ( | RW | ) | inline_mysql_prlock_rdlock(RW) |
Instrumented rw_pr_rdlock. mysql_prlock_rdlock
is a drop-in replacement for rw_pr_rdlock
.
Definition at line 395 of file mysql_thread.h.
#define mysql_prlock_unlock | ( | RW | ) | inline_mysql_prlock_unlock(RW) |
Instrumented rw_pr_unlock. mysql_prlock_unlock
is a drop-in replacement for rw_pr_unlock
.
Definition at line 469 of file mysql_thread.h.
#define mysql_prlock_wrlock | ( | RW | ) | inline_mysql_prlock_wrlock(RW) |
Instrumented rw_pr_wrlock. mysql_prlock_wrlock
is a drop-in replacement for rw_pr_wrlock
.
Definition at line 423 of file mysql_thread.h.
#define mysql_rwlock_destroy | ( | RW | ) | inline_mysql_rwlock_destroy(RW) |
Instrumented rwlock_destroy. mysql_rwlock_destroy
is a drop-in replacement for pthread_rwlock_destroy
.
Definition at line 361 of file mysql_thread.h.
#define mysql_rwlock_init | ( | K, | |
RW | |||
) | inline_mysql_rwlock_init(RW) |
Instrumented rwlock_init. mysql_rwlock_init
is a replacement for pthread_rwlock_init
. Note that pthread_rwlockattr_t is not supported in MySQL.
K | The PSI_rwlock_key for this instrumented rwlock |
RW | The rwlock to initialize |
Definition at line 339 of file mysql_thread.h.
#define mysql_rwlock_rdlock | ( | RW | ) | inline_mysql_rwlock_rdlock(RW) |
Instrumented rwlock_rdlock. mysql_rwlock_rdlock
is a drop-in replacement for pthread_rwlock_rdlock
.
Definition at line 381 of file mysql_thread.h.
#define mysql_rwlock_register | ( | P1, | |
P2, | |||
P3 | |||
) | inline_mysql_rwlock_register(P1, P2, P3) |
Rwlock registration.
Definition at line 325 of file mysql_thread.h.
#define mysql_rwlock_tryrdlock | ( | RW | ) | inline_mysql_rwlock_tryrdlock(RW) |
Instrumented rwlock_tryrdlock. mysql_rwlock_tryrdlock
is a drop-in replacement for pthread_rwlock_tryrdlock
.
Definition at line 437 of file mysql_thread.h.
#define mysql_rwlock_trywrlock | ( | RW | ) | inline_mysql_rwlock_trywrlock(RW) |
Instrumented rwlock_trywrlock. mysql_rwlock_trywrlock
is a drop-in replacement for pthread_rwlock_trywrlock
.
Definition at line 451 of file mysql_thread.h.
#define mysql_rwlock_unlock | ( | RW | ) | inline_mysql_rwlock_unlock(RW) |
Instrumented rwlock_unlock. mysql_rwlock_unlock
is a drop-in replacement for pthread_rwlock_unlock
.
Definition at line 461 of file mysql_thread.h.
#define mysql_rwlock_wrlock | ( | RW | ) | inline_mysql_rwlock_wrlock(RW) |
Instrumented rwlock_wrlock. mysql_rwlock_wrlock
is a drop-in replacement for pthread_rwlock_wrlock
.
Definition at line 409 of file mysql_thread.h.
#define mysql_thread_create | ( | K, | |
P1, | |||
P2, | |||
P3, | |||
P4 | |||
) | pthread_create(P1, P2, P3, P4) |
Instrumented pthread_create. This function creates both the thread instrumentation and a thread. mysql_thread_create
is a replacement for pthread_create
. The parameter P4 (or, if it is NULL, P1) will be used as the instrumented thread "indentity". Providing a P1 / P4 parameter with a different value for each call will on average improve performances, since this thread identity value is used internally to randomize access to data and prevent contention. This is optional, and the improvement is not guaranteed, only statistical.
K | The PSI_thread_key for this instrumented thread |
P1 | pthread_create parameter 1 |
P2 | pthread_create parameter 2 |
P3 | pthread_create parameter 3 |
P4 | pthread_create parameter 4 |
Definition at line 569 of file mysql_thread.h.
#define mysql_thread_register | ( | P1, | |
P2, | |||
P3 | |||
) | inline_mysql_thread_register(P1, P2, P3) |
Thread registration.
Definition at line 545 of file mysql_thread.h.
#define mysql_thread_set_psi_id | ( | I | ) | do {} while (0) |
Set the thread indentifier for the instrumentation.
I | The thread identifier |
Definition at line 581 of file mysql_thread.h.
typedef struct st_mysql_cond mysql_cond_t |
Type of an instrumented condition. mysql_cond_t
is a drop-in replacement for pthread_cond_t
.
Definition at line 182 of file mysql_thread.h.
typedef struct st_mysql_mutex mysql_mutex_t |
Type of an instrumented mutex. mysql_mutex_t
is a drop-in replacement for pthread_mutex_t
.
Definition at line 97 of file mysql_thread.h.
typedef struct st_mysql_prlock mysql_prlock_t |
Type of an instrumented prlock. A prlock is a read write lock that 'prefers readers' (pr). mysql_prlock_t
is a drop-in replacement for rw_pr_lock_t
.
Definition at line 154 of file mysql_thread.h.
typedef struct st_mysql_rwlock mysql_rwlock_t |
Type of an instrumented rwlock. mysql_rwlock_t
is a drop-in replacement for pthread_rwlock_t
.
Definition at line 142 of file mysql_thread.h.