projects
/
userspace-rcu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rcuja: add fallback nodes
[userspace-rcu.git]
/
rcuja
/
rcuja-shadow-nodes.c
diff --git
a/rcuja/rcuja-shadow-nodes.c
b/rcuja/rcuja-shadow-nodes.c
index 3a5de33669a9f53db204e6e473c9e928f48803c7..89b4c4517adfe1d6619b8a6a003f431ded283510 100644
(file)
--- a/
rcuja/rcuja-shadow-nodes.c
+++ b/
rcuja/rcuja-shadow-nodes.c
@@
-220,7
+220,7
@@
void rcuja_shadow_unlock(struct cds_ja_shadow_node *shadow_node)
}
__attribute__((visibility("protected")))
}
__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)
{
struct cds_ja_inode *new_node,
struct cds_ja_shadow_node *inherit_from)
{
@@
-230,7
+230,7
@@
int rcuja_shadow_set(struct cds_lfht *ht,
shadow_node = calloc(sizeof(*shadow_node), 1);
if (!shadow_node)
shadow_node = calloc(sizeof(*shadow_node), 1);
if (!shadow_node)
- return
-ENOMEM
;
+ return
NULL
;
shadow_node->node = new_node;
/*
shadow_node->node = new_node;
/*
@@
-242,7
+242,7
@@
int rcuja_shadow_set(struct cds_lfht *ht,
shadow_node->lock = calloc(sizeof(*shadow_node->lock), 1);
if (!shadow_node->lock) {
free(shadow_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);
}
}
pthread_mutex_init(shadow_node->lock, NULL);
}
@@
-258,9
+258,9
@@
int rcuja_shadow_set(struct cds_lfht *ht,
if (ret_node != &shadow_node->ht_node) {
free(shadow_node);
if (ret_node != &shadow_node->ht_node) {
free(shadow_node);
- return
-EEXIST
;
+ return
NULL
;
}
}
- return
0
;
+ return
shadow_node
;
}
static
}
static
This page took
0.025857 seconds
and
4
git commands to generate.