MySQL 8.0.40
Source Code Documentation
|
The simple hash table utility. More...
Functions | |
bool | hash_lock_has_all_x (const hash_table_t *table) |
Verifies that the current thread holds X-latch on all shards. More... | |
void | hash_lock_x_all (hash_table_t *table) |
Reserves all the locks of a hash table, in an ascending order. More... | |
void | hash_unlock_x_all (hash_table_t *table) |
Releases all the locks of a hash table, in an ascending order. More... | |
void | hash_unlock_x_all_but (hash_table_t *table, rw_lock_t *keep_lock) |
Releases all but passed in lock of a hash table,. More... | |
void | hash_create_sync_obj (hash_table_t *table, latch_id_t id, size_t n_sync_obj) |
Creates a sync object array to protect a hash table. More... | |
The simple hash table utility.
Created 5/20/1997 Heikki Tuuri
void hash_create_sync_obj | ( | hash_table_t * | table, |
latch_id_t | id, | ||
size_t | n_sync_obj | ||
) |
Creates a sync object array to protect a hash table.
[in] | table | hash table |
[in] | id | latch ID |
[in] | n_sync_obj | number of sync objects, must be a power of 2 |
bool hash_lock_has_all_x | ( | const hash_table_t * | table | ) |
Verifies that the current thread holds X-latch on all shards.
Assumes type==HASH_TABLE_SYNC_RW_LOCK.
[in] | table | the table in question |
void hash_lock_x_all | ( | hash_table_t * | table | ) |
Reserves all the locks of a hash table, in an ascending order.
in: hash table
table | in: hash table |
void hash_unlock_x_all | ( | hash_table_t * | table | ) |
Releases all the locks of a hash table, in an ascending order.
in: hash table
table | in: hash table |
void hash_unlock_x_all_but | ( | hash_table_t * | table, |
rw_lock_t * | keep_lock | ||
) |
Releases all but passed in lock of a hash table,.
[in] | table | Hash table |
[in] | keep_lock | Lock to keep |
table | in: hash table |
keep_lock | in: lock to keep |