MySQL 9.1.0
Source Code Documentation
|
Functions to handle initialization and allocation of all mysys & debug thread variables. More...
#include <stdlib.h>
#include <sys/types.h>
#include <time.h>
#include "my_dbug.h"
#include "my_inttypes.h"
#include "my_macros.h"
#include "my_psi_config.h"
#include "my_sys.h"
#include "my_systime.h"
#include "my_thread.h"
#include "my_thread_local.h"
#include "mysql/my_loglevel.h"
#include "mysql/psi/mysql_cond.h"
#include "mysql/psi/mysql_mutex.h"
#include "mysql/psi/mysql_thread.h"
#include "mysql/psi/psi_thread.h"
#include "mysys/mysys_priv.h"
#include "mysys_err.h"
#include "thr_mutex.h"
Classes | |
struct | st_my_thread_var |
Functions | |
static struct st_my_thread_var * | mysys_thread_var () |
static int | set_mysys_thread_var (struct st_my_thread_var *mysys_var) |
void | my_thread_global_reinit () |
Re-initialize components initialized early with my_thread_global_init . More... | |
bool | my_thread_global_init () |
initialize thread environment More... | |
void | my_thread_global_end () |
bool | my_thread_init () |
Allocate thread specific memory for the thread, used by mysys and dbug. More... | |
bool | my_thread_is_inited () |
void | my_thread_end () |
Deallocate memory used by the thread for book-keeping. More... | |
int | my_errno () |
Retrieve the MySQL thread-local storage variant of errno. More... | |
void | set_my_errno (int my_errno) |
Set the MySQL thread-local storage variant of errno. More... | |
my_thread_id | my_thread_var_id () |
void | set_my_thread_var_id (my_thread_id id) |
CODE_STATE ** | my_thread_var_dbug () |
Variables | |
static bool | my_thread_global_init_done = false |
static uint | THR_thread_count = 0 |
static Timeout_type | my_thread_end_wait_time = 5 |
static my_thread_id | thread_id = 0 |
static thread_local st_my_thread_var * | THR_mysys = nullptr |
static thread_local int | THR_myerrno = 0 |
mysql_mutex_t | THR_LOCK_myisam_mmap |
mysql_mutex_t | THR_LOCK_myisam |
mysql_mutex_t | THR_LOCK_heap |
mysql_mutex_t | THR_LOCK_malloc |
mysql_mutex_t | THR_LOCK_open |
mysql_mutex_t | THR_LOCK_lock |
mysql_mutex_t | THR_LOCK_net |
mysql_mutex_t | THR_LOCK_threads |
mysql_cond_t | THR_COND_threads |
Functions to handle initialization and allocation of all mysys & debug thread variables.
int my_errno | ( | ) |
Retrieve the MySQL thread-local storage variant of errno.
void my_thread_end | ( | void | ) |
Deallocate memory used by the thread for book-keeping.
void my_thread_global_end | ( | ) |
bool my_thread_global_init | ( | ) |
initialize thread environment
false | ok |
true | error |
void my_thread_global_reinit | ( | ) |
Re-initialize components initialized early with my_thread_global_init
.
Some mutexes were initialized before the instrumentation. Destroy + create them again, now that the instrumentation is in place. This is safe, since this function() is called before creating new threads, so the mutexes are not in use.
bool my_thread_init | ( | void | ) |
Allocate thread specific memory for the thread, used by mysys and dbug.
false | ok |
true | Fatal error; mysys/dbug functions can't be used |
bool my_thread_is_inited | ( | ) |
CODE_STATE ** my_thread_var_dbug | ( | ) |
my_thread_id my_thread_var_id | ( | ) |
|
static |
void set_my_errno | ( | int | my_errno | ) |
Set the MySQL thread-local storage variant of errno.
void set_my_thread_var_id | ( | my_thread_id | id | ) |
|
static |
|
static |
|
static |
mysql_cond_t THR_COND_threads |
mysql_mutex_t THR_LOCK_heap |
mysql_mutex_t THR_LOCK_lock |
mysql_mutex_t THR_LOCK_malloc |
mysql_mutex_t THR_LOCK_myisam |
mysql_mutex_t THR_LOCK_myisam_mmap |
mysql_mutex_t THR_LOCK_net |
mysql_mutex_t THR_LOCK_open |
mysql_mutex_t THR_LOCK_threads |
|
static |
|
static |
|
static |
|
static |