X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=rcuja%2Frcuja-shadow-nodes.c;h=917c6a2038e8c11a809fb4acfd5cf69be8d57b02;hb=21ac4c56cd0edffc0590b649b6ed1e7b61269b20;hp=093135f751b7fa787d70ba44c425b62e45a34c08;hpb=48cbe00177cd135553ee34d2f443c351b53b6d25;p=userspace-rcu.git diff --git a/rcuja/rcuja-shadow-nodes.c b/rcuja/rcuja-shadow-nodes.c index 093135f..917c6a2 100644 --- a/rcuja/rcuja-shadow-nodes.c +++ b/rcuja/rcuja-shadow-nodes.c @@ -33,7 +33,6 @@ #include #include "rcuja-internal.h" -#include "bitfield.h" static unsigned long hash_seed; @@ -280,7 +279,7 @@ void free_shadow_node_and_node(struct rcu_head *head) { struct cds_ja_shadow_node *shadow_node = caa_container_of(head, struct cds_ja_shadow_node, head); - free_cds_ja_node(ja_node_ptr(shadow_node->node_flag)); + free_cds_ja_node(shadow_node->ja, ja_node_ptr(shadow_node->node_flag)); free(shadow_node); } @@ -299,7 +298,7 @@ void free_shadow_node_and_node_and_lock(struct rcu_head *head) struct cds_ja_shadow_node *shadow_node = caa_container_of(head, struct cds_ja_shadow_node, head); assert(shadow_node->level); - free_cds_ja_node(ja_node_ptr(shadow_node->node_flag)); + free_cds_ja_node(shadow_node->ja, ja_node_ptr(shadow_node->node_flag)); free(shadow_node->lock); free(shadow_node); } @@ -378,7 +377,7 @@ rcu_unlock: __attribute__((visibility("protected"))) void rcuja_shadow_prune(struct cds_lfht *ht, unsigned int flags, - void (*free_node_cb)(struct rcu_head *head)) + void (*rcu_free_node)(struct cds_ja_node *node)) { const struct rcu_flavor_struct *flavor; struct cds_ja_shadow_node *shadow_node; @@ -398,7 +397,7 @@ void rcuja_shadow_prune(struct cds_lfht *ht, if (shadow_node->level == shadow_node->ja->tree_depth - 1) { rcuja_free_all_children(shadow_node, shadow_node->node_flag, - free_node_cb); + rcu_free_node); } if (flags & RCUJA_SHADOW_CLEAR_FREE_LOCK) { flavor->update_call_rcu(&shadow_node->head,