Zephyr API Documentation  3.6.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
hash_map_api.h File Reference
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <zephyr/sys/hash_function.h>
#include <zephyr/sys/util.h>

Go to the source code of this file.

Data Structures

struct  sys_hashmap_iterator
 Generic Hashmap iterator interface. More...
 
struct  sys_hashmap_api
 Generic Hashmap API. More...
 
struct  sys_hashmap_config
 Generic Hashmap configuration. More...
 
struct  sys_hashmap_data
 Generic Hashmap data. More...
 

Macros

#define SYS_HASHMAP_CONFIG(_max_size, _load_factor)
 Initializer for sys_hashmap_config.
 

Typedefs

typedef void *(* sys_hashmap_allocator_t) (void *ptr, size_t new_size)
 Allocator interface for sys_hashmap.
 
typedef void(* sys_hashmap_iterator_t) (const struct sys_hashmap *map, struct sys_hashmap_iterator *it)
 In-place iterator constructor for sys_hashmap.
 
typedef void(* sys_hashmap_callback_t) (uint64_t key, uint64_t value, void *cookie)
 Callback interface for sys_hashmap.
 
typedef void(* sys_hashmap_clear_t) (struct sys_hashmap *map, sys_hashmap_callback_t cb, void *cookie)
 Clear all entries contained in a sys_hashmap.
 
typedef int(* sys_hashmap_insert_t) (struct sys_hashmap *map, uint64_t key, uint64_t value, uint64_t *old_value)
 Insert a new entry into a sys_hashmap.
 
typedef bool(* sys_hashmap_remove_t) (struct sys_hashmap *map, uint64_t key, uint64_t *value)
 Remove an entry from a sys_hashmap.
 
typedef bool(* sys_hashmap_get_t) (const struct sys_hashmap *map, uint64_t key, uint64_t *value)
 Get a value from a sys_hashmap.
 

Functions

static bool sys_hashmap_iterator_has_next (const struct sys_hashmap_iterator *it)
 Check if a Hashmap iterator has a next entry.