| rculfhash.h | | rculfhash.h | |
| | | | |
| skipping to change at line 136 | | skipping to change at line 136 | |
| const struct cds_lfht_mm_type *mm, | | const struct cds_lfht_mm_type *mm, | |
| const struct rcu_flavor_struct *flavor, | | const struct rcu_flavor_struct *flavor, | |
| pthread_attr_t *attr); | | pthread_attr_t *attr); | |
| | | | |
| /* | | /* | |
| * cds_lfht_new - allocate a hash table. | | * cds_lfht_new - allocate a hash table. | |
| * @init_size: number of buckets to allocate initially. Must be power of tw
o. | | * @init_size: number of buckets to allocate initially. Must be power of tw
o. | |
| * @min_nr_alloc_buckets: the minimum number of allocated buckets. | | * @min_nr_alloc_buckets: the minimum number of allocated buckets. | |
| * (must be power of two) | | * (must be power of two) | |
| * @max_nr_buckets: the maximum number of hash table buckets allowed. | | * @max_nr_buckets: the maximum number of hash table buckets allowed. | |
|
| * (must be power of two) | | * (must be power of two, 0 is accepted, means | |
| | | * "infinite") | |
| * @flags: hash table creation flags (can be combined with bitwise or: '|')
. | | * @flags: hash table creation flags (can be combined with bitwise or: '|')
. | |
| * 0: no flags. | | * 0: no flags. | |
| * CDS_LFHT_AUTO_RESIZE: automatically resize hash table. | | * CDS_LFHT_AUTO_RESIZE: automatically resize hash table. | |
| * CDS_LFHT_ACCOUNTING: count the number of node addition | | * CDS_LFHT_ACCOUNTING: count the number of node addition | |
| * and removal in the table | | * and removal in the table | |
| * @attr: optional resize worker thread attributes. NULL for default. | | * @attr: optional resize worker thread attributes. NULL for default. | |
| * | | * | |
| * Return NULL on error. | | * Return NULL on error. | |
| * Note: the RCU flavor must be already included before the hash table head
er. | | * Note: the RCU flavor must be already included before the hash table head
er. | |
| * | | * | |
| | | | |
| skipping to change at line 473 | | skipping to change at line 474 | |
| for (cds_lfht_lookup(ht, hash, match, key, iter), \ | | for (cds_lfht_lookup(ht, hash, match, key, iter), \ | |
| node = cds_lfht_iter_get_node(iter); \ | | node = cds_lfht_iter_get_node(iter); \ | |
| node != NULL; \ | | node != NULL; \ | |
| cds_lfht_next_duplicate(ht, match, key, iter), \ | | cds_lfht_next_duplicate(ht, match, key, iter), \ | |
| node = cds_lfht_iter_get_node(iter)) | | node = cds_lfht_iter_get_node(iter)) | |
| | | | |
| #define cds_lfht_for_each_entry(ht, iter, pos, member) \ | | #define cds_lfht_for_each_entry(ht, iter, pos, member) \ | |
| for (cds_lfht_first(ht, iter), \ | | for (cds_lfht_first(ht, iter), \ | |
| pos = caa_container_of(cds_lfht_iter_get_node(iter),
\ | | pos = caa_container_of(cds_lfht_iter_get_node(iter),
\ | |
| __typeof__(*(pos)), member); \ | | __typeof__(*(pos)), member); \ | |
|
| &(pos)->member != NULL; \ | | cds_lfht_iter_get_node(iter) != NULL; \ | |
| cds_lfht_next(ht, iter), \ | | cds_lfht_next(ht, iter), \ | |
| pos = caa_container_of(cds_lfht_iter_get_node(iter),
\ | | pos = caa_container_of(cds_lfht_iter_get_node(iter),
\ | |
| __typeof__(*(pos)), member)) | | __typeof__(*(pos)), member)) | |
| | | | |
| #define cds_lfht_for_each_entry_duplicate(ht, hash, match, key,
\ | | #define cds_lfht_for_each_entry_duplicate(ht, hash, match, key,
\ | |
| iter, pos, member) \ | | iter, pos, member) \ | |
| for (cds_lfht_lookup(ht, hash, match, key, iter), \ | | for (cds_lfht_lookup(ht, hash, match, key, iter), \ | |
| pos = caa_container_of(cds_lfht_iter_get_node(iter),
\ | | pos = caa_container_of(cds_lfht_iter_get_node(iter),
\ | |
| __typeof__(*(pos)), member); \ | | __typeof__(*(pos)), member); \ | |
|
| &(pos)->member != NULL; \ | | cds_lfht_iter_get_node(iter) != NULL; \ | |
| cds_lfht_next_duplicate(ht, match, key, iter), \ | | cds_lfht_next_duplicate(ht, match, key, iter), \ | |
| pos = caa_container_of(cds_lfht_iter_get_node(iter),
\ | | pos = caa_container_of(cds_lfht_iter_get_node(iter),
\ | |
| __typeof__(*(pos)), member)) | | __typeof__(*(pos)), member)) | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| } | | } | |
| #endif | | #endif | |
| | | | |
| #endif /* _URCU_RCULFHASH_H */ | | #endif /* _URCU_RCULFHASH_H */ | |
| | | | |
End of changes. 3 change blocks. |
| 3 lines changed or deleted | | 4 lines changed or added | |
|