doc/examples: cds_lfht_add_replace
[urcu.git] / doc / examples / rculfhash / cds_lfht_add_unique.c
index ec594c803961b8b12ff5c328a33d50192d96ede6..f1a7631d5a4cd5a35522e87754632ecfc1b65d3c 100644 (file)
@@ -33,6 +33,7 @@ struct mynode {
        struct cds_lfht_node node;      /* Chaining in hash table */
 };
 
+static
 int match(struct cds_lfht_node *ht_node, const void *_key)
 {
        struct mynode *node =
@@ -113,11 +114,11 @@ int main(int argc, char **argv)
                         * match. It did not add the new node to the
                         * hash table, so we can free it on the spot.
                         */
-                       printf("Not adding duplicate key: %d, seqnum: %d\n",
+                       printf("Not adding duplicate (key: %d, seqnum: %d)\n",
                                node->value, node->seqnum);
                        free(node);
                } else {
-                       printf("Add key: %d, seqnum: %d\n",
+                       printf("Add (key: %d, seqnum: %d)\n",
                                node->value, node->seqnum);
                }
                rcu_read_unlock();
This page took 0.022917 seconds and 4 git commands to generate.