hash table comment fix.
[urcu.git] / urcu-ht.h
index 58a2cedc8e887337f173cc17b607236bc457a05f..baf144d9086a872aa7f44ccfbaf6a147c73d3f9d 100644 (file)
--- a/urcu-ht.h
+++ b/urcu-ht.h
@@ -3,17 +3,24 @@
 
 #include <stdint.h>
 
-typedef uint32_t (*ht_hash_fct)(void *key);
+/*
+ * Caution !
+ * Ensure writer threads are registered as urcu readers and 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),
-                     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);
 
@@ -23,6 +30,8 @@ int ht_delete(struct rcu_ht *ht, void *key);
 
 void *ht_steal(struct rcu_ht *ht, void *key);
 
-uint32_t ht_jhash(void *key, u32 length, u32 initval);
+void ht_resize(struct rcu_ht *ht, int growth);
+
+uint32_t ht_jhash(void *key, uint32_t length, uint32_t initval);
 
 #endif /* _URCU_HT_H */
This page took 0.022696 seconds and 4 git commands to generate.