![]() |
MySQL 8.0.43
Source Code Documentation
|
#include "sql/sql_timer.h"#include <stddef.h>#include <atomic>#include "my_dbug.h"#include "my_inttypes.h"#include "my_macros.h"#include "my_sys.h"#include "my_thread_local.h"#include "my_timer.h"#include "mysql/components/services/bits/mysql_mutex_bits.h"#include "mysql/psi/mysql_mutex.h"#include "mysql/service_mysql_alloc.h"#include "sql/mysqld.h"#include "sql/mysqld_thd_manager.h"#include "sql/psi_memory_key.h"#include "sql/sql_class.h"#include "thr_mutex.h"Classes | |
| struct | THD_timer_info |
Macros | |
| #define | my_container_of(ptr, type, member) ((type *)((char *)ptr - offsetof(type, member))) |
| Cast a member of a structure to the structure that contains it. More... | |
Functions | |
| static void | timer_callback (my_timer_t *timer) |
| Timer expiration notification callback. More... | |
| static THD_timer_info * | thd_timer_create (void) |
| Allocate and initialize a thread timer object. More... | |
| static bool | timer_notify (THD_timer_info *thd_timer) |
| Notify a thread (session) that its timer has expired. More... | |
| THD_timer_info * | thd_timer_set (THD *thd, THD_timer_info *thd_timer, unsigned long time) |
| Set the time until the currently running statement is aborted. More... | |
| static bool | reap_timer (THD_timer_info *thd_timer, bool pending) |
| Reap a (possibly) pending timer object. More... | |
| THD_timer_info * | thd_timer_reset (THD_timer_info *thd_timer) |
| Deactivate the given timer. More... | |
| void | thd_timer_destroy (THD_timer_info *thd_timer) |
| Release resources allocated for a thread timer. More... | |
Cast a member of a structure to the structure that contains it.
| ptr | Pointer to the member. |
| type | Type of the structure that contains the member. |
| member | Name of the member within the structure. |
|
static |
Reap a (possibly) pending timer object.
| thd_timer | Thread timer object. |
| pending | State of the timer object. true if timer is not expired. false otherwise. |
|
static |
Allocate and initialize a thread timer object.
| void thd_timer_destroy | ( | THD_timer_info * | thd_timer | ) |
Release resources allocated for a thread timer.
| thd_timer | Thread timer object. |
| THD_timer_info * thd_timer_reset | ( | THD_timer_info * | thd_timer | ) |
Deactivate the given timer.
| thd_timer | Thread timer object. |
| THD_timer_info * thd_timer_set | ( | THD * | thd, |
| THD_timer_info * | thd_timer, | ||
| unsigned long | time | ||
| ) |
Set the time until the currently running statement is aborted.
| thd | Thread (session) context. |
| thd_timer | Thread timer object. |
| time | Length of time, in milliseconds, until the currently running statement is aborted. |
|
static |
Timer expiration notification callback.
| timer | Timer (mysys) object. |
|
static |
Notify a thread (session) that its timer has expired.
| thd_timer | Thread timer object. |