#include <urcu/rculfhash.h> /* RCU Lock-free hash table */
#include <urcu/compiler.h> /* For CAA_ARRAY_SIZE */
#include "jhash.h" /* Example hash function */
#include <urcu/rculfhash.h> /* RCU Lock-free hash table */
#include <urcu/compiler.h> /* For CAA_ARRAY_SIZE */
#include "jhash.h" /* Example hash function */
- ht = cds_lfht_new(1, 1, 0,
+ ht = cds_lfht_new_flavor(1, 1, 0,
ht_node = cds_lfht_add_unique(ht, hash, match, &value,
&node->node);
/*
ht_node = cds_lfht_add_unique(ht, hash, match, &value,
&node->node);
/*
* match. It did not add the new node to the
* hash table, so we can free it on the spot.
*/
* match. It did not add the new node to the
* hash table, so we can free it on the spot.
*/
cds_lfht_for_each_entry(ht, &iter, node, node) {
printf(" (key: %d, seqnum: %d)",
node->value, node->seqnum);
}
cds_lfht_for_each_entry(ht, &iter, node, node) {
printf(" (key: %d, seqnum: %d)",
node->value, node->seqnum);
}