projects
/
urcu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rculfhash: document fini_table
[urcu.git]
/
rculfhash.c
diff --git
a/rculfhash.c
b/rculfhash.c
index dd49c500db4aa8fa77b859101b3e021ed6ecb96b..8c835dedb71c733cca89872ff685e254c5297a23 100644
(file)
--- a/
rculfhash.c
+++ b/
rculfhash.c
@@
-549,7
+549,7
@@
void ht_count_add(struct cds_lfht *ht, unsigned long size, unsigned long hash)
dbg_printf("add split count %lu\n", split_count);
count = uatomic_add_return(&ht->count,
1UL << COUNT_COMMIT_ORDER);
dbg_printf("add split count %lu\n", split_count);
count = uatomic_add_return(&ht->count,
1UL << COUNT_COMMIT_ORDER);
- if (likely(count & (count - 1)))
+ if (
caa_
likely(count & (count - 1)))
return;
/* Only if global count is power of 2 */
return;
/* Only if global count is power of 2 */
@@
-578,7
+578,7
@@
void ht_count_del(struct cds_lfht *ht, unsigned long size, unsigned long hash)
dbg_printf("del split count %lu\n", split_count);
count = uatomic_add_return(&ht->count,
-(1UL << COUNT_COMMIT_ORDER));
dbg_printf("del split count %lu\n", split_count);
count = uatomic_add_return(&ht->count,
-(1UL << COUNT_COMMIT_ORDER));
- if (likely(count & (count - 1)))
+ if (
caa_
likely(count & (count - 1)))
return;
/* Only if global count is power of 2 */
return;
/* Only if global count is power of 2 */
@@
-1158,6
+1158,11
@@
void remove_table(struct cds_lfht *ht, unsigned long i, unsigned long len)
partition_resize_helper(ht, i, len, remove_table_partition);
}
partition_resize_helper(ht, i, len, remove_table_partition);
}
+/*
+ * fini_table() is never called for first_order == 0, which is why
+ * free_by_rcu_order == 0 can be used as criterion to know if free must
+ * be called.
+ */
static
void fini_table(struct cds_lfht *ht,
unsigned long first_order, unsigned long last_order)
static
void fini_table(struct cds_lfht *ht,
unsigned long first_order, unsigned long last_order)
This page took
0.023734 seconds
and
4
git commands to generate.