projects
/
urcu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rculfhash: set next to NULL when node is NULL
[urcu.git]
/
rculfhash.c
diff --git
a/rculfhash.c
b/rculfhash.c
index 0c2b3abbb4915910cb408546c018581e900725f1..8ed9c10b2386c710c2791ed8db3565d4ea13bce5 100644
(file)
--- a/
rculfhash.c
+++ b/
rculfhash.c
@@
-566,12
+566,6
@@
void ht_count_add(struct cds_lfht *ht, unsigned long size)
if ((count >> CHAIN_LEN_RESIZE_THRESHOLD) < size)
return;
dbg_printf("add set global %ld\n", count);
if ((count >> CHAIN_LEN_RESIZE_THRESHOLD) < size)
return;
dbg_printf("add set global %ld\n", count);
- /*
- * Don't resize table if the number of nodes is below a
- * certain threshold.
- */
- if (count < (1UL << COUNT_COMMIT_ORDER))
- return;
cds_lfht_resize_lazy_count(ht, size,
count >> (CHAIN_LEN_TARGET - 1));
}
cds_lfht_resize_lazy_count(ht, size,
count >> (CHAIN_LEN_TARGET - 1));
}
@@
-602,10
+596,10
@@
void ht_count_del(struct cds_lfht *ht, unsigned long size)
return;
dbg_printf("del set global %ld\n", count);
/*
return;
dbg_printf("del set global %ld\n", count);
/*
- * Don't
resize
table if the number of nodes is below a
+ * Don't
shrink
table if the number of nodes is below a
* certain threshold.
*/
* certain threshold.
*/
- if (count < (1UL << COUNT_COMMIT_ORDER))
+ if (count < (1UL << COUNT_COMMIT_ORDER)
* (nr_cpus_mask + 1)
)
return;
cds_lfht_resize_lazy_count(ht, size,
count >> (CHAIN_LEN_TARGET - 1));
return;
cds_lfht_resize_lazy_count(ht, size,
count >> (CHAIN_LEN_TARGET - 1));
@@
-1286,11
+1280,11
@@
void cds_lfht_lookup(struct cds_lfht *ht, void *key, size_t key_len,
node = clear_flag(node);
for (;;) {
if (unlikely(is_end(node))) {
node = clear_flag(node);
for (;;) {
if (unlikely(is_end(node))) {
- node = NULL;
+ node =
next =
NULL;
break;
}
if (unlikely(node->p.reverse_hash > reverse_hash)) {
break;
}
if (unlikely(node->p.reverse_hash > reverse_hash)) {
- node = NULL;
+ node =
next =
NULL;
break;
}
next = rcu_dereference(node->p.next);
break;
}
next = rcu_dereference(node->p.next);
@@
-1322,11
+1316,11
@@
void cds_lfht_next(struct cds_lfht *ht, struct cds_lfht_iter *iter)
for (;;) {
if (unlikely(is_end(node))) {
for (;;) {
if (unlikely(is_end(node))) {
- node = NULL;
+ node =
next =
NULL;
break;
}
if (unlikely(node->p.reverse_hash > reverse_hash)) {
break;
}
if (unlikely(node->p.reverse_hash > reverse_hash)) {
- node = NULL;
+ node =
next =
NULL;
break;
}
next = rcu_dereference(node->p.next);
break;
}
next = rcu_dereference(node->p.next);
@@
-1458,10
+1452,10
@@
int cds_lfht_destroy(struct cds_lfht *ht, pthread_attr_t **attr)
}
void cds_lfht_count_nodes(struct cds_lfht *ht,
}
void cds_lfht_count_nodes(struct cds_lfht *ht,
-
unsigned
long *approx_before,
+ long *approx_before,
unsigned long *count,
unsigned long *removed,
unsigned long *count,
unsigned long *removed,
-
unsigned
long *approx_after)
+ long *approx_after)
{
struct cds_lfht_node *node, *next;
struct _cds_lfht_node *lookup;
{
struct cds_lfht_node *node, *next;
struct _cds_lfht_node *lookup;
This page took
0.025761 seconds
and
4
git commands to generate.