![]() |
MOS Source Code
|
A simple hashmap. More...
Topics | |
libs.HashMap.Common | |
Common hash and comparison functions for hashmaps. | |
Classes | |
struct | hashmap_t |
Typedefs | |
typedef hash_t(* | hashmap_hash_t) (const uintn key) |
typedef int(* | hashmap_key_compare_t) (const uintn key1, const uintn key2) |
A hashmap hash function prototype. | |
typedef bool(* | hashmap_foreach_func_t) (const uintn key, void *value, void *data) |
A hashmap key comparison function prototype. | |
Functions | |
MOSAPI void | hashmap_init (hashmap_t *map, size_t capacity, hashmap_hash_t hash_func, hashmap_key_compare_t compare_func) |
MOSAPI void | hashmap_deinit (hashmap_t *map) |
Deinitialize a hashmap. | |
MOSAPI void * | hashmap_put (hashmap_t *map, uintn key, void *value) |
MOSAPI void * | hashmap_get (hashmap_t *map, uintn key) |
MOSAPI void * | hashmap_remove (hashmap_t *map, uintn key) |
MOSAPI void | hashmap_foreach (hashmap_t *map, hashmap_foreach_func_t func, void *data) |
A simple hashmap.
Definition at line 18 of file hashmap.hpp.
A hashmap hash function prototype.
Definition at line 19 of file hashmap.hpp.
A hashmap key comparison function prototype.
Definition at line 20 of file hashmap.hpp.
MOSAPI void hashmap_init | ( | hashmap_t * | map, |
size_t | capacity, | ||
hashmap_hash_t | hash_func, | ||
hashmap_key_compare_t | compare_func ) |
Definition at line 20 of file hashmap.cpp.
Referenced by ipc_init().
Deinitialize a hashmap.
map | The hashmap to deinitialize. |
Definition at line 45 of file hashmap.cpp.
Referenced by __mos_test_wrapped_test_hashmap_foreach_function(), __mos_test_wrapped_test_hashmap_get_function(), __mos_test_wrapped_test_hashmap_init_simple_macro(), __mos_test_wrapped_test_hashmap_put_multiple(), __mos_test_wrapped_test_hashmap_put_overflow(), __mos_test_wrapped_test_hashmap_put_single(), and __mos_test_wrapped_test_hashmap_remove_function().
Definition at line 64 of file hashmap.cpp.
Referenced by __mos_test_wrapped_test_hashmap_foreach_function(), __mos_test_wrapped_test_hashmap_get_function(), __mos_test_wrapped_test_hashmap_put_multiple(), __mos_test_wrapped_test_hashmap_put_overflow(), __mos_test_wrapped_test_hashmap_put_single(), __mos_test_wrapped_test_hashmap_remove_function(), and ipc_connect_to_server().
Definition at line 92 of file hashmap.cpp.
Referenced by __mos_test_wrapped_test_hashmap_get_function(), __mos_test_wrapped_test_hashmap_put_multiple(), __mos_test_wrapped_test_hashmap_put_overflow(), __mos_test_wrapped_test_hashmap_put_single(), __mos_test_wrapped_test_hashmap_remove_function(), ipc_connect_to_server(), ipc_server_close(), and ipc_server_create().
Definition at line 113 of file hashmap.cpp.
Referenced by __mos_test_wrapped_test_hashmap_remove_function().
MOSAPI void hashmap_foreach | ( | hashmap_t * | map, |
hashmap_foreach_func_t | func, | ||
void * | data ) |
Definition at line 142 of file hashmap.cpp.
Referenced by __mos_test_wrapped_test_hashmap_foreach_function(), and ipc_sysfs_dump_name_waitlist().