28 #include "hash0hash.ic"
33 #ifndef UNIV_HOTBACKUP
35 # ifdef UNIV_PFS_MUTEX
36 UNIV_INTERN mysql_pfs_key_t hash_table_mutex_key;
73 for (i = 0; i < table->n_mutexes; i++) {
75 mutex_enter(table->mutexes + i);
89 for (i = 0; i < table->n_mutexes; i++) {
91 mutex_exit(table->mutexes + i);
116 table->
array = array;
117 table->n_cells = prime;
118 #ifndef UNIV_HOTBACKUP
119 # if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG
120 table->adaptive = FALSE;
122 table->n_mutexes = 0;
123 table->mutexes = NULL;
127 ut_d(table->magic_n = HASH_TABLE_MAGIC_N);
144 ut_ad(table->magic_n == HASH_TABLE_MAGIC_N);
145 #ifndef UNIV_HOTBACKUP
146 ut_a(table->mutexes == NULL);
153 #ifndef UNIV_HOTBACKUP
161 #ifdef UNIV_SYNC_DEBUG
171 ut_ad(table->magic_n == HASH_TABLE_MAGIC_N);
177 for (i = 0; i < n_mutexes; i++) {
178 mutex_create(hash_table_mutex_key,
179 table->mutexes + i, sync_level);
182 table->n_mutexes = n_mutexes;
UNIV_INTERN void hash_create_mutexes_func(hash_table_t *table, ulint n_mutexes)
UNIV_INTERN ulint ut_find_prime(ulint n) __attribute__((const ))
UNIV_INTERN void * ut_malloc(ulint n)
UNIV_INTERN hash_table_t * hash_create(ulint n)
UNIV_INTERN void hash_mutex_enter_all(hash_table_t *table)
UNIV_INTERN void hash_table_free(hash_table_t *table)
UNIV_INTERN void hash_mutex_exit(hash_table_t *table, ulint fold)
UNIV_INLINE void hash_table_clear(hash_table_t *table)
UNIV_INTERN void hash_mutex_exit_all(hash_table_t *table)
UNIV_INTERN void ut_free(void *ptr)
UNIV_INTERN void hash_mutex_enter(hash_table_t *table, ulint fold)
UNIV_INLINE mutex_t * hash_get_mutex(hash_table_t *table, ulint fold)