MySQL 8.0.39
Source Code Documentation
|
MySQL mutex implementation. More...
#include <assert.h>
#include <stddef.h>
#include <stdlib.h>
#include <sys/types.h>
#include "my_inttypes.h"
#include "my_macros.h"
#include "my_thread.h"
#include "mysql/components/services/bits/thr_mutex_bits.h"
Go to the source code of this file.
Macros | |
#define | MY_MUTEX_INIT_SLOW NULL |
#define | MY_MUTEX_INIT_FAST NULL |
#define | MY_MUTEX_INIT_ERRCHK NULL |
Functions | |
static int | native_mutex_init (native_mutex_t *mutex, const native_mutexattr_t *attr) |
static int | native_mutex_lock (native_mutex_t *mutex) |
static int | native_mutex_trylock (native_mutex_t *mutex) |
static int | native_mutex_unlock (native_mutex_t *mutex) |
static int | native_mutex_destroy (native_mutex_t *mutex) |
static int | my_mutex_init (my_mutex_t *mp, const native_mutexattr_t *attr) |
static int | my_mutex_lock (my_mutex_t *mp) |
static int | my_mutex_trylock (my_mutex_t *mp) |
static int | my_mutex_unlock (my_mutex_t *mp) |
static int | my_mutex_destroy (my_mutex_t *mp) |
MySQL mutex implementation.
There are three "layers": 1) native_mutex_*() Functions that map directly down to OS primitives. Windows - CriticalSection Other OSes - pthread 2) my_mutex_*() Functions that implement SAFE_MUTEX (default for debug), Otherwise native_mutex_*() is used. 3) mysql_mutex_*() Functions that include Performance Schema instrumentation. See include/mysql/psi/mysql_thread.h
#define MY_MUTEX_INIT_ERRCHK NULL |
#define MY_MUTEX_INIT_FAST NULL |
#define MY_MUTEX_INIT_SLOW NULL |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |