projects
/
urcu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
urcu-ht: fix del node race
[urcu.git]
/
urcu-ht.h
diff --git
a/urcu-ht.h
b/urcu-ht.h
index 58a2cedc8e887337f173cc17b607236bc457a05f..d822a451d77abf5d213dde6ed1f81262750dbbe5 100644
(file)
--- a/
urcu-ht.h
+++ b/
urcu-ht.h
@@
-3,17
+3,25
@@
#include <stdint.h>
#include <stdint.h>
-typedef uint32_t (*ht_hash_fct)(void *key);
+/*
+ * Caution !
+ * Ensure writer threads are registered as urcu readers and with with
+ * urcu-defer.
+ * Ensure reader threads are registered as urcu readers.
+ */
+
+typedef uint32_t (*ht_hash_fct)(void *key, uint32_t length, uint32_t initval);
/*
* init_size must be power of two.
*/
struct rcu_ht *ht_new(ht_hash_fct hash_fct, void (*free_fct)(void *data),
/*
* init_size must be power of two.
*/
struct rcu_ht *ht_new(ht_hash_fct hash_fct, void (*free_fct)(void *data),
- unsigned long init_size);
+ unsigned long init_size, uint32_t keylen,
+ uint32_t hashseed);
-
void
ht_delete_all(struct rcu_ht *ht);
+
int
ht_delete_all(struct rcu_ht *ht);
-
void
ht_destroy(struct rcu_ht *ht);
+
int
ht_destroy(struct rcu_ht *ht);
void *ht_lookup(struct rcu_ht *ht, void *key);
void *ht_lookup(struct rcu_ht *ht, void *key);
@@
-23,6
+31,6
@@
int ht_delete(struct rcu_ht *ht, void *key);
void *ht_steal(struct rcu_ht *ht, void *key);
void *ht_steal(struct rcu_ht *ht, void *key);
-uint32_t ht_jhash(void *key, u
32 length, u32
initval);
+uint32_t ht_jhash(void *key, u
int32_t length, uint32_t
initval);
#endif /* _URCU_HT_H */
#endif /* _URCU_HT_H */
This page took
0.022924 seconds
and
4
git commands to generate.