urcu-ht: add correct hash, implement delete_all
[urcu.git] / urcu-ht.h
CommitLineData
ab7d5fc6
MD
1#ifndef _URCU_HT_H
2#define _URCU_HT_H
3
674f7a69 4#include <stdint.h>
ab7d5fc6 5
674f7a69
MD
6typedef uint32_t (*ht_hash_fct)(void *key);
7
8/*
9 * init_size must be power of two.
10 */
11struct rcu_ht *ht_new(ht_hash_fct hash_fct, void (*free_fct)(void *data),
12 unsigned long init_size);
ab7d5fc6
MD
13
14void ht_delete_all(struct rcu_ht *ht);
15
16void ht_destroy(struct rcu_ht *ht);
17
18void *ht_lookup(struct rcu_ht *ht, void *key);
19
20int ht_add(struct rcu_ht *ht, void *key, void *data);
21
22int ht_delete(struct rcu_ht *ht, void *key);
23
24void *ht_steal(struct rcu_ht *ht, void *key);
25
674f7a69 26uint32_t ht_jhash(void *key, u32 length, u32 initval);
ab7d5fc6
MD
27
28#endif /* _URCU_HT_H */
This page took 0.0324410000000001 seconds and 4 git commands to generate.