{
}
+/*
+ * cds_lfht_node_init_deleted - initialize a hash table node to "removed" state
+ * @node: the node to initialize.
+ *
+ * Initialize the node such that cds_lfht_is_node_deleted() can be used
+ * on the node before it is added to a hash table.
+ */
+extern
+void cds_lfht_node_init_deleted(struct cds_lfht_node *node);
+
/*
* Hash table creation flags.
*/
return ((unsigned long) node) & REMOVAL_OWNER_FLAG;
}
+static
+struct cds_lfht_node *flag_removed(struct cds_lfht_node *node)
+{
+ return (struct cds_lfht_node *) (((unsigned long) node) | REMOVED_FLAG);
+}
+
static
struct cds_lfht_node *flag_removal_owner(struct cds_lfht_node *node)
{
}
#endif
+void cds_lfht_node_init_deleted(struct cds_lfht_node *node)
+{
+ cds_lfht_node_init(node);
+ node->next = flag_removed(NULL);
+}
+
struct cds_lfht *_cds_lfht_new(unsigned long init_size,
unsigned long min_nr_alloc_buckets,
unsigned long max_nr_buckets,