hash table comment fix.
[urcu.git] / urcu-ht.h
... / ...
CommitLineData
1#ifndef _URCU_HT_H
2#define _URCU_HT_H
3
4#include <stdint.h>
5
6/*
7 * Caution !
8 * Ensure writer threads are registered as urcu readers and with urcu-defer.
9 * Ensure reader threads are registered as urcu readers.
10 */
11
12typedef uint32_t (*ht_hash_fct)(void *key, uint32_t length, uint32_t initval);
13
14/*
15 * init_size must be power of two.
16 */
17struct rcu_ht *ht_new(ht_hash_fct hash_fct, void (*free_fct)(void *data),
18 unsigned long init_size, uint32_t keylen,
19 uint32_t hashseed);
20
21int ht_delete_all(struct rcu_ht *ht);
22
23int ht_destroy(struct rcu_ht *ht);
24
25void *ht_lookup(struct rcu_ht *ht, void *key);
26
27int ht_add(struct rcu_ht *ht, void *key, void *data);
28
29int ht_delete(struct rcu_ht *ht, void *key);
30
31void *ht_steal(struct rcu_ht *ht, void *key);
32
33void ht_resize(struct rcu_ht *ht, int growth);
34
35uint32_t ht_jhash(void *key, uint32_t length, uint32_t initval);
36
37#endif /* _URCU_HT_H */
This page took 0.028509 seconds and 4 git commands to generate.