A hash table implementation. More...

Go to the source code of this file.
Data Structures | |
| struct | sys_hashtable_iterator |
| Iterator state for hash table traversal. More... | |
| struct | sys_hashtable_entry_t |
| Hash table entry. More... | |
Macros | |
| #define | SYS_HASHTABLE_KEY_SIZE 24 |
| Maximum key size in bytes. | |
Typedefs | |
| typedef struct sys_hashtable | sys_hashtable_t |
| Opaque type for hash table. More... | |
| typedef struct sys_hashtable_iterator | sys_hashtable_iterator_t |
| Iterator state for hash table traversal. More... | |
| typedef bool(* | sys_hashtable_keyequals_t) (void *keyptr, void *other_keyptr) |
| Compare entry with a key. More... | |
Functions | |
| sys_hashtable_t * | sys_hashtable_init (size_t size, sys_hashtable_keyequals_t keyequals) |
| Initialize a new hash table. More... | |
| void | sys_hashtable_finalize (sys_hashtable_t *table) |
| Free all the hash tables in the chain. More... | |
| sys_hashtable_entry_t * | sys_hashtable_get_key (sys_hashtable_t *table, uintptr_t hash, void *keyptr) |
| Search for an entry in the hash table by hash key. More... | |
| sys_hashtable_entry_t * | sys_hashtable_get_value (sys_hashtable_t *table, uintptr_t value) |
| Search for an entry in the hash table by hash value. More... | |
| sys_hashtable_entry_t * | sys_hashtable_put (sys_hashtable_t *table, uintptr_t hash, void *keyptr, bool *samekey) |
| Return a has table entry in which to put the value, and perhaps the key. More... | |
| sys_hashtable_entry_t * | sys_hashtable_delete_key (sys_hashtable_t *table, uintptr_t hash, void *keyptr) |
| Delete an entry into the hash table by key. More... | |
| sys_hashtable_entry_t * | sys_hashtable_delete_value (sys_hashtable_t *table, uintptr_t value) |
| Delete an entry from the hash table by value. More... | |
| sys_hashtable_entry_t * | sys_hashtable_iterator_next (sys_hashtable_t *table, sys_hashtable_iterator_t **iterator) |
| Get the next entry from the iterator. More... | |
| size_t | sys_hashtable_count (sys_hashtable_t *table) |
| Get the number of active entries in the hash table chain. More... | |
| size_t | sys_hashtable_capacity (sys_hashtable_t *table) |
| Get the total capacity of all tables in the chain. More... | |
A hash table implementation.
Definition in file hashtable.h.