Data Structures | |
struct | CHTbl_ |
Structure for the hashmap. More... | |
Typedefs | |
typedef CHTbl_ | CHTbl |
Structure for the hashmap. | |
Functions | |
int | chtbl_init (CHTbl *htbl, int buckets, int(*h)(const void *key), int(*match)(const void *obj1, const void *obj2), void(*destroy)(void *obj)) |
Initialize hash map. | |
void | chtbl_destroy (CHTbl *htbl) |
Destroy hash map. | |
int | chtbl_size (CHTbl *htbl) |
Destroy hash map. | |
int | chtbl_insert (CHTbl *htbl, const void *data) |
Insert element in hash map. | |
int | chtbl_remove (CHTbl *htbl, void **data) |
Remove element from hash map. | |
int | chtbl_lookup (CHTbl *htbl, void **data) |
Lookup for element in hash map. |
|
Structure for the hashmap. Holds the internal data for managing the hashmap. Referenced by chtbl_destroy(), chtbl_init(), chtbl_insert(), chtbl_lookup(), chtbl_remove(), and chtbl_size(). |
|
Destroy hash map.
Definition at line 34 of file hashmap.c. References CHTbl_::buckets, CHTbl, list_destroy(), CHTbl_::rwlock, T_RDWR_WLOCK, T_RDWR_WUNLOCK, and CHTbl_::table. |
|
Initialize hash map.
Definition at line 6 of file hashmap.c. References CHTbl_::buckets, CHTbl, CHTbl_::h, List, list_init(), CHTbl_::rwlock, T_RDWR_INIT, and CHTbl_::table. |
|
Insert element in hash map.
Definition at line 80 of file hashmap.c. References CHTbl_::buckets, CHTbl, CHTbl_::h, list_insert(), CHTbl_::rwlock, T_RDWR_RLOCK, T_RDWR_RUNLOCK, and CHTbl_::table. |
|
Lookup for element in hash map.
Definition at line 129 of file hashmap.c. References CHTbl_::buckets, CHTbl, CHTbl_::h, list_lookup(), CHTbl_::rwlock, T_RDWR_RLOCK, T_RDWR_RUNLOCK, and CHTbl_::table. |
|
Remove element from hash map.
Definition at line 106 of file hashmap.c. References CHTbl_::buckets, CHTbl, CHTbl_::h, list_remove(), CHTbl_::rwlock, T_RDWR_RLOCK, T_RDWR_RUNLOCK, and CHTbl_::table. |
|
Destroy hash map.
Definition at line 60 of file hashmap.c. References CHTbl_::buckets, CHTbl, list_getsize(), CHTbl_::rwlock, T_RDWR_RLOCK, T_RDWR_RUNLOCK, and CHTbl_::table. |