Fix: workqueue: remove unused variable "ret"
[urcu.git] / src / rculfhash.c
index 04fd49946aa940184015a4921971feff5d3818e5..872d6ff1dea4d1a8533f5bc0c3ba70fe0a438db3 100644 (file)
@@ -763,7 +763,7 @@ void ht_count_del(struct cds_lfht *ht, unsigned long size, unsigned long hash)
 
        if ((count >> CHAIN_LEN_RESIZE_THRESHOLD) >= size)
                return;
 
        if ((count >> CHAIN_LEN_RESIZE_THRESHOLD) >= size)
                return;
-       dbg_printf("del set global %ld\n", count);
+       dbg_printf("del set global %lu\n", count);
        /*
         * Don't shrink table if the number of nodes is below a
         * certain threshold.
        /*
         * Don't shrink table if the number of nodes is below a
         * certain threshold.
@@ -851,6 +851,12 @@ int is_removal_owner(struct cds_lfht_node *node)
        return ((unsigned long) node) & REMOVAL_OWNER_FLAG;
 }
 
        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)
 {
 static
 struct cds_lfht_node *flag_removal_owner(struct cds_lfht_node *node)
 {
@@ -1578,6 +1584,12 @@ const struct cds_lfht_mm_type *get_mm_type(
 }
 #endif
 
 }
 #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,
 struct cds_lfht *_cds_lfht_new(unsigned long init_size,
                        unsigned long min_nr_alloc_buckets,
                        unsigned long max_nr_buckets,
This page took 0.031278 seconds and 4 git commands to generate.