15 #define SYS_HASHTABLE_KEY_SIZE 24 101 uintptr_t hash,
void *keyptr);
129 void *keyptr,
bool *samekey);
140 uintptr_t hash,
void *keyptr);
void * keyptr
Pointer to key data.
struct sys_hashtable_iterator sys_hashtable_iterator_t
Iterator state for hash table traversal.
void sys_hashtable_finalize(sys_hashtable_t *table)
Free all the hash tables in the chain.
size_t index
Current index within table.
bool(* sys_hashtable_keyequals_t)(void *keyptr, void *other_keyptr)
Compare entry with a key.
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.
sys_hashtable_t * sys_hashtable_init(size_t size, sys_hashtable_keyequals_t keyequals)
Initialize a new hash table.
#define SYS_HASHTABLE_KEY_SIZE
Maximum key size in bytes.
Iterator state for hash table traversal.
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.
sys_hashtable_t * table
Current table being iterated.
uint8_t flags
Entry flags (implementation-specific)
sys_hashtable_entry_t * sys_hashtable_iterator_next(sys_hashtable_t *table, sys_hashtable_iterator_t **iterator)
Get the next entry from the iterator.
uintptr_t value
Value associated with the entry.
struct sys_hashtable sys_hashtable_t
Opaque type for hash table.
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.
size_t sys_hashtable_capacity(sys_hashtable_t *table)
Get the total capacity of all tables in the chain.
uintptr_t hash
Hash key for the entry.
sys_hashtable_entry_t * sys_hashtable_delete_value(sys_hashtable_t *table, uintptr_t value)
Delete an entry from the hash table by value.
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.
size_t sys_hashtable_count(sys_hashtable_t *table)
Get the number of active entries in the hash table chain.