Data Structures | |
struct | hashtable |
struct | hashtable_node |
Functions | |
struct hashtable * | hashtable_create (int hashsize, int limit, uint32_t(*hash)(const void *data, const struct hashtable *table), int(*compare)(const void *data1, const void *data2)) |
void | hashtable_destroy (struct hashtable *h) |
int | hashtable_hash (const struct hashtable *table, const void *data) |
struct hashtable_node * | hashtable_find (const struct hashtable *table, const void *data, int id) |
int | hashtable_add (struct hashtable *table, struct hashtable_node *n, int id) |
void | hashtable_del (struct hashtable *table, struct hashtable_node *node) |
int | hashtable_flush (struct hashtable *table) |
int | hashtable_iterate (struct hashtable *table, void *data, int(*iterate)(void *data, void *n)) |
int | hashtable_iterate_limit (struct hashtable *table, void *data, uint32_t from, uint32_t steps, int(*iterate)(void *data1, void *n)) |
unsigned int | hashtable_counter (const struct hashtable *table) |
int hashtable_add | ( | struct hashtable * | table, |
struct hashtable_node * | n, | ||
int | id | ||
) |
References hashtable::count, hashtable_node::head, hashtable::limit, and hashtable::members.
References hashtable::count.
struct hashtable* hashtable_create | ( | int | hashsize, |
int | limit, | ||
uint32_t(*)(const void *data, const struct hashtable *table) | hash, | ||
int(*)(const void *data1, const void *data2) | compare | ||
) |
References hashtable::compare, hashtable::hash, hashtable::hashsize, INIT_LIST_HEAD, INIT_LLIST_HEAD, hashtable::limit, hashtable::members, NULL, and size.
void hashtable_del | ( | struct hashtable * | table, |
struct hashtable_node * | node | ||
) |
References hashtable::count, and hashtable_node::head.
struct hashtable_node* hashtable_find | ( | const struct hashtable * | table, |
const void * | data, | ||
int | id | ||
) |
References hashtable::compare, hashtable_node::head, list_entry, list_for_each, llist_entry, llist_for_each, hashtable::members, and NULL.
References hashtable::hash.
int hashtable_iterate | ( | struct hashtable * | table, |
void * | data, | ||
int(*)(void *data, void *n) | iterate | ||
) |
int hashtable_iterate_limit | ( | struct hashtable * | table, |
void * | data, | ||
uint32_t | from, | ||
uint32_t | steps, | ||
int(*)(void *data1, void *n) | iterate | ||
) |
References hashtable::hashsize, hashtable_node::head, list_entry, list_for_each_safe, llist_entry, llist_for_each_safe, and hashtable::members.
Referenced by hashtable_iterate().