struct cds_lfht *ht;
};
+__attribute__((visibility("protected")))
+struct rcu_ja_shadow_node *rcuja_shadow_lookup_lock(struct cds_lfht *ht,
+ struct rcu_ja_node *node);
+__attribute__((visibility("protected")))
+void rcuja_shadow_unlock(struct rcu_ja_shadow_node *shadow_node);
+__attribute__((visibility("protected")))
+int rcuja_shadow_set(struct cds_lfht *ht,
+ struct rcu_ja_node *node);
+__attribute__((visibility("protected")))
+int rcuja_shadow_clear_and_free_node(struct cds_lfht *ht,
+ struct rcu_ja_node *node);
+__attribute__((visibility("protected")))
+struct cds_lfht *rcuja_create_ht(void);
+__attribute__((visibility("protected")))
+void rcuja_delete_ht(struct cds_lfht *ht);
+
#endif /* _URCU_RCUJA_INTERNAL_H */
return shadow_node;
}
+__attribute__((visibility("protected")))
void rcuja_shadow_unlock(struct rcu_ja_shadow_node *shadow_node)
{
int ret;
}
static
-void free_shadow_node(struct rcu_head *head)
+void free_shadow_node_and_node(struct rcu_head *head)
{
struct rcu_ja_shadow_node *shadow_node =
caa_container_of(head, struct rcu_ja_shadow_node, head);
+ free(shadow_node->node);
free(shadow_node);
}
__attribute__((visibility("protected")))
-int rcuja_shadow_clear(struct cds_lfht *ht,
+int rcuja_shadow_clear_and_free_node(struct cds_lfht *ht,
struct rcu_ja_node *node)
{
struct cds_lfht_iter iter;
*/
ret = cds_lfht_del(ht, lookup_node);
if (!ret) {
- call_rcu(&shadow_node->head, free_shadow_node);
+ call_rcu(&shadow_node->head, free_shadow_node_and_node);
}
lockret = pthread_mutex_unlock(&shadow_node->lock);
assert(!lockret);