MOS Source Code
Loading...
Searching...
No Matches
hashmap.c File Reference
+ Include dependency graph for hashmap.c:

Go to the source code of this file.

Classes

struct  hashmap_entry_t
 

Macros

#define HASHMAP_MAGIC   MOS_FOURCC('H', 'M', 'a', 'p')
 

Functions

 SLAB_AUTOINIT ("hashmap_entry", hashmap_entry_slab, hashmap_entry_t)
 
void hashmap_init (hashmap_t *map, size_t capacity, hashmap_hash_t hash_func, hashmap_key_compare_t compare_func)
 
void hashmap_deinit (hashmap_t *map)
 Deinitialize a hashmap.
 
voidhashmap_put (hashmap_t *map, uintn key, void *value)
 
voidhashmap_get (hashmap_t *map, uintn key)
 
voidhashmap_remove (hashmap_t *map, uintn key)
 
void hashmap_foreach (hashmap_t *map, hashmap_foreach_func_t func, void *data)
 

Variables

slab_thashmap_entry_slab = NULL
 

Macro Definition Documentation

◆ HASHMAP_MAGIC

#define HASHMAP_MAGIC   MOS_FOURCC('H', 'M', 'a', 'p')

Function Documentation

◆ SLAB_AUTOINIT()

SLAB_AUTOINIT ( "hashmap_entry" ,
hashmap_entry_slab ,
hashmap_entry_t  )

Variable Documentation

◆ hashmap_entry_slab

slab_t* hashmap_entry_slab = NULL

Definition at line 21 of file hashmap.c.

Referenced by hashmap_put().