InnoDB Plugin  1.0
Functions
hash0hash.ic File Reference
#include "ut0rnd.h"
Include dependency graph for hash0hash.ic:
This graph shows which files directly or indirectly include this file:

Functions

UNIV_INLINE hash_cell_thash_get_nth_cell (hash_table_t *table, ulint n)
UNIV_INLINE void hash_table_clear (hash_table_t *table)
UNIV_INLINE ulint hash_get_n_cells (hash_table_t *table)
UNIV_INLINE ulint hash_calc_hash (ulint fold, hash_table_t *table)
UNIV_INLINE ulint hash_get_sync_obj_index (hash_table_t *table, ulint fold)
UNIV_INLINE mem_heap_thash_get_nth_heap (hash_table_t *table, ulint i)
UNIV_INLINE mem_heap_thash_get_heap (hash_table_t *table, ulint fold)
UNIV_INLINE ib_mutex_thash_get_nth_mutex (hash_table_t *table, ulint i)
UNIV_INLINE ib_mutex_thash_get_mutex (hash_table_t *table, ulint fold)
UNIV_INLINE rw_lock_thash_get_nth_lock (hash_table_t *table, ulint i)
UNIV_INLINE rw_lock_thash_get_lock (hash_table_t *table, ulint fold)

Detailed Description

The simple hash table utility

Created 5/20/1997 Heikki Tuuri

Function Documentation

UNIV_INLINE ulint hash_calc_hash ( ulint  fold,
hash_table_t table 
)

Calculates the hash value from a folded value.

Returns
hashed value
Parameters
foldin: folded value
tablein: hash table
UNIV_INLINE mem_heap_t* hash_get_heap ( hash_table_t table,
ulint  fold 
)

Gets the heap for a fold value in a hash table.

Returns
mem heap
Parameters
tablein: hash table
foldin: fold
UNIV_INLINE rw_lock_t* hash_get_lock ( hash_table_t table,
ulint  fold 
)

Gets the rw_lock for a fold value in a hash table.

Returns
rw_lock
Parameters
tablein: hash table
foldin: fold
UNIV_INLINE ib_mutex_t* hash_get_mutex ( hash_table_t table,
ulint  fold 
)

Gets the mutex for a fold value in a hash table.

Returns
mutex
Parameters
tablein: hash table
foldin: fold
UNIV_INLINE ulint hash_get_n_cells ( hash_table_t table)

Returns the number of cells in a hash table.

Returns
number of cells
Parameters
tablein: table
UNIV_INLINE hash_cell_t* hash_get_nth_cell ( hash_table_t table,
ulint  n 
)

Gets the nth cell in a hash table.

Returns
pointer to cell
Parameters
tablein: hash table
nin: cell index
UNIV_INLINE mem_heap_t* hash_get_nth_heap ( hash_table_t table,
ulint  i 
)

Gets the nth heap in a hash table.

Returns
mem heap
Parameters
tablein: hash table
iin: index of the heap
UNIV_INLINE rw_lock_t* hash_get_nth_lock ( hash_table_t table,
ulint  i 
)

Gets the nth rw_lock in a hash table.

Returns
rw_lock
Parameters
tablein: hash table
iin: index of the rw_lock
UNIV_INLINE ib_mutex_t* hash_get_nth_mutex ( hash_table_t table,
ulint  i 
)

Gets the nth mutex in a hash table.

Returns
mutex
Parameters
tablein: hash table
iin: index of the mutex
UNIV_INLINE ulint hash_get_sync_obj_index ( hash_table_t table,
ulint  fold 
)

Gets the sync object index for a fold value in a hash table.

Returns
index
Parameters
tablein: hash table
foldin: fold
UNIV_INLINE void hash_table_clear ( hash_table_t table)

Clears a hash table so that all the cells become empty.

Parameters
tablein/out: hash table