Zephyr API Documentation 4.0.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
hash_map_oa_lp.h File Reference

Open-Addressing / Linear Probe Hashmap Implementation. More...

#include <stddef.h>
#include <zephyr/sys/hash_function.h>
#include <zephyr/sys/hash_map_api.h>

Go to the source code of this file.

Data Structures

struct  sys_hashmap_oa_lp_data
 

Macros

#define SYS_HASHMAP_OA_LP_DEFINE_ADVANCED(_name, _hash_func, _alloc_func, ...)
 Declare a Open Addressing Linear Probe Hashmap (advanced)
 
#define SYS_HASHMAP_OA_LP_DEFINE_STATIC_ADVANCED(_name, _hash_func, _alloc_func, ...)
 Declare a Open Addressing Linear Probe Hashmap (advanced)
 
#define SYS_HASHMAP_OA_LP_DEFINE_STATIC(_name)
 Declare a Open Addressing Linear Probe Hashmap statically.
 
#define SYS_HASHMAP_OA_LP_DEFINE(_name)
 Declare a Open Addressing Linear Probe Hashmap.
 

Variables

const struct sys_hashmap_api sys_hashmap_oa_lp_api
 

Detailed Description

Open-Addressing / Linear Probe Hashmap Implementation.

Note
Enable with CONFIG_SYS_HASH_MAP_OA_LP

Macro Definition Documentation

◆ SYS_HASHMAP_OA_LP_DEFINE

#define SYS_HASHMAP_OA_LP_DEFINE ( _name)
Value:
static uint32_t sys_hash32(const void *str, size_t n)
System default 32-bit hash function.
Definition hash_function.h:119
#define SYS_HASHMAP_DEFAULT_LOAD_FACTOR
The default Hashmap load factor (in hundredths)
Definition hash_map.h:122
#define SYS_HASHMAP_CONFIG(_max_size, _load_factor)
Initializer for sys_hashmap_config.
Definition hash_map_api.h:214
#define SYS_HASHMAP_DEFAULT_ALLOCATOR
The default Hashmap allocator.
Definition hash_map.h:119
#define SYS_HASHMAP_OA_LP_DEFINE_ADVANCED(_name, _hash_func, _alloc_func,...)
Declare a Open Addressing Linear Probe Hashmap (advanced)
Definition hash_map_oa_lp.h:47
#define SIZE_MAX
Definition stdint.h:70

Declare a Open Addressing Linear Probe Hashmap.

Declare a Open Addressing Linear Probe Hashmap with default parameters.

Parameters
_nameName of the Hashmap.

◆ SYS_HASHMAP_OA_LP_DEFINE_ADVANCED

#define SYS_HASHMAP_OA_LP_DEFINE_ADVANCED ( _name,
_hash_func,
_alloc_func,
... )
Value:
sys_hashmap_oa_lp_data, _hash_func, _alloc_func, __VA_ARGS__)
#define SYS_HASHMAP_DEFINE_ADVANCED(_name, _api, _config_type, _data_type, _hash_func, _alloc_func,...)
Declare a Hashmap (advanced)
Definition hash_map.h:47
const struct sys_hashmap_api sys_hashmap_oa_lp_api
Generic Hashmap configuration.
Definition hash_map_api.h:197
Definition hash_map_oa_lp.h:27

Declare a Open Addressing Linear Probe Hashmap (advanced)

Declare a Open Addressing Linear Probe Hashmap with control over advanced parameters.

Note
The allocator _alloc is used for allocating internal Hashmap entries and does not interact with any user-provided keys or values.
Parameters
_nameName of the Hashmap.
_hash_funcHash function pointer of type sys_hash_func32_t.
_alloc_funcAllocator function pointer of type sys_hashmap_allocator_t.
...Variant-specific details for sys_hashmap_config.

◆ SYS_HASHMAP_OA_LP_DEFINE_STATIC

#define SYS_HASHMAP_OA_LP_DEFINE_STATIC ( _name)
Value:
#define SYS_HASHMAP_OA_LP_DEFINE_STATIC_ADVANCED(_name, _hash_func, _alloc_func,...)
Declare a Open Addressing Linear Probe Hashmap (advanced)
Definition hash_map_oa_lp.h:64

Declare a Open Addressing Linear Probe Hashmap statically.

Declare a Open Addressing Linear Probe Hashmap statically with default parameters.

Parameters
_nameName of the Hashmap.

◆ SYS_HASHMAP_OA_LP_DEFINE_STATIC_ADVANCED

#define SYS_HASHMAP_OA_LP_DEFINE_STATIC_ADVANCED ( _name,
_hash_func,
_alloc_func,
... )
Value:
sys_hashmap_oa_lp_data, _hash_func, _alloc_func, \
__VA_ARGS__)
#define SYS_HASHMAP_DEFINE_STATIC_ADVANCED(_name, _api, _config_type, _data_type, _hash_func, _alloc_func,...)
Declare a Hashmap statically (advanced)
Definition hash_map.h:75

Declare a Open Addressing Linear Probe Hashmap (advanced)

Declare a Open Addressing Linear Probe Hashmap with control over advanced parameters.

Note
The allocator _alloc is used for allocating internal Hashmap entries and does not interact with any user-provided keys or values.
Parameters
_nameName of the Hashmap.
_hash_funcHash function pointer of type sys_hash_func32_t.
_alloc_funcAllocator function pointer of type sys_hashmap_allocator_t.
...Details for sys_hashmap_config.

Variable Documentation

◆ sys_hashmap_oa_lp_api

const struct sys_hashmap_api sys_hashmap_oa_lp_api
extern