]> pd.if.org Git - nbds/blob - include/hashtable.h
refactor header files
[nbds] / include / hashtable.h
1 #ifndef HASHTABLE_H
2 #define HASHTABLE_H
3
4 #include "datatype.h"
5
6 typedef struct ht hashtable_t;
7
8 hashtable_t *ht_alloc (const datatype_t *key_type);
9 uint64_t ht_cas    (hashtable_t *ht, void *key, uint64_t expected_val, uint64_t val);
10 uint64_t ht_get    (hashtable_t *ht, void *key);
11 uint64_t ht_remove (hashtable_t *ht, void *key);
12 uint64_t ht_count  (hashtable_t *ht);
13 void     ht_print  (hashtable_t *ht);
14 void     ht_free   (hashtable_t *ht);
15
16 #endif//HASHTABLE_H