}
__attribute__((visibility("protected")))
-int rcuja_shadow_set(struct cds_lfht *ht,
+struct cds_ja_shadow_node *rcuja_shadow_set(struct cds_lfht *ht,
struct cds_ja_inode *new_node,
struct cds_ja_shadow_node *inherit_from)
{
shadow_node = calloc(sizeof(*shadow_node), 1);
if (!shadow_node)
- return -ENOMEM;
+ return NULL;
shadow_node->node = new_node;
/*
shadow_node->lock = calloc(sizeof(*shadow_node->lock), 1);
if (!shadow_node->lock) {
free(shadow_node);
- return -ENOMEM;
+ return NULL;
}
pthread_mutex_init(shadow_node->lock, NULL);
}
if (ret_node != &shadow_node->ht_node) {
free(shadow_node);
- return -EEXIST;
+ return NULL;
}
- return 0;
+ return shadow_node;
}
static