1aa98c5618b25da6219e87c0e15ec60dfc2ea2e5
1 #ifndef _URCU_RCULFHASH_H
2 #define _URCU_RCULFHASH_H
5 #include <urcu-call-rcu.h>
8 struct rcu_ht_node
*next
;
11 unsigned long reverse_hash
;
21 * Ensure reader and writer threads are registered as urcu readers.
24 typedef unsigned long (*ht_hash_fct
)(void *hashseed
, void *key
);
27 void ht_node_init(struct rcu_ht_node
*node
, void *key
, void *value
)
35 * init_size must be power of two.
37 struct rcu_ht
*ht_new(ht_hash_fct hash_fct
,
39 unsigned long init_size
,
40 void (*ht_call_rcu
)(struct rcu_head
*head
,
41 void (*func
)(struct rcu_head
*head
)));
43 int ht_destroy(struct rcu_ht
*ht
);
45 /* Call with rcu_read_lock held. */
46 struct rcu_ht_node
*ht_lookup(struct rcu_ht
*ht
, void *key
);
48 /* Call with rcu_read_lock held. */
49 void ht_add(struct rcu_ht
*ht
, struct rcu_ht_node
*node
);
51 /* Call with rcu_read_lock held. */
52 int ht_remove(struct rcu_ht
*ht
, struct rcu_ht_node
*node
);
54 void ht_resize(struct rcu_ht
*ht
, int growth
);
56 #endif /* _URCU_RCULFHASH_H */
This page took 0.029908 seconds and 4 git commands to generate.