}
static
-void free_node(struct ja_test_node *node)
+void free_test_node(struct ja_test_node *node)
{
poison_free(node);
if (leak_detection)
}
static
-void free_node_cb(struct rcu_head *head)
+void free_test_node_cb(struct rcu_head *head)
{
struct ja_test_node *node =
caa_container_of(head, struct ja_test_node, head);
- free_node(node);
+ free_test_node(node);
}
static
void rcu_free_test_node(struct ja_test_node *test_node)
{
- call_rcu(&test_node->head, free_node_cb);
+ call_rcu(&test_node->head, free_test_node_cb);
}
static
-void rcu_free_node(struct cds_ja_node *node)
+void free_node(struct cds_ja_node *node)
{
struct ja_test_node *test_node = to_test_node(node);
- rcu_free_test_node(test_node);
+ free_test_node(test_node);
}
#if 0
printf("OK\n");
- ret = cds_ja_destroy(test_ja, rcu_free_node);
+ ret = cds_ja_destroy(test_ja, free_node);
if (ret) {
fprintf(stderr, "Error destroying judy array\n");
return -1;
printf("OK\n");
- ret = cds_ja_destroy(test_ja, rcu_free_node);
+ ret = cds_ja_destroy(test_ja, free_node);
if (ret) {
fprintf(stderr, "Error destroying judy array\n");
return -1;
}
printf("OK\n");
- ret = cds_ja_destroy(test_ja, rcu_free_node);
+ ret = cds_ja_destroy(test_ja, free_node);
if (ret) {
fprintf(stderr, "Error destroying judy array\n");
return -1;
if (add_unique) {
ret_node = cds_ja_add_unique(test_ja, key, &node->node);
if (ret_node != &node->node) {
- free_node(node);
+ free_test_node(node);
URCU_TLS(nr_addexist)++;
} else {
URCU_TLS(nr_add)++;
ret = cds_ja_add(test_ja, key, &node->node);
if (ret) {
fprintf(stderr, "Error in cds_ja_add: %d\n", ret);
- free_node(node);
+ free_test_node(node);
} else {
URCU_TLS(nr_add)++;
}
}
rcu_thread_online_qsbr();
- ret = cds_ja_destroy(test_ja, rcu_free_node);
+ ret = cds_ja_destroy(test_ja, free_node);
if (ret) {
fprintf(stderr, "Error destroying judy array\n");
goto end;