X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=urcu%2Frculfhash.h;h=f934c4cabc6a75a625fdef6cc48e460505b66779;hb=refs%2Fheads%2Fstable-0.7;hp=23bd1ce3bded4fd4e83f51e0c63c34b48f788acb;hpb=b1ebcb1b6b6403034867682c9469aaec3d04e76c;p=userspace-rcu.git diff --git a/urcu/rculfhash.h b/urcu/rculfhash.h index 23bd1ce..f934c4c 100644 --- a/urcu/rculfhash.h +++ b/urcu/rculfhash.h @@ -132,7 +132,8 @@ struct cds_lfht *_cds_lfht_new(unsigned long init_size, * @min_nr_alloc_buckets: the minimum number of allocated buckets. * (must be power of two) * @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: '|'). * 0: no flags. * CDS_LFHT_AUTO_RESIZE: automatically resize hash table. @@ -462,7 +463,7 @@ void cds_lfht_resize(struct cds_lfht *ht, unsigned long new_size); for (cds_lfht_first(ht, iter), \ pos = caa_container_of(cds_lfht_iter_get_node(iter), \ __typeof__(*(pos)), member); \ - &(pos)->member != NULL; \ + cds_lfht_iter_get_node(iter) != NULL; \ cds_lfht_next(ht, iter), \ pos = caa_container_of(cds_lfht_iter_get_node(iter), \ __typeof__(*(pos)), member)) @@ -472,7 +473,7 @@ void cds_lfht_resize(struct cds_lfht *ht, unsigned long new_size); for (cds_lfht_lookup(ht, hash, match, key, iter), \ pos = caa_container_of(cds_lfht_iter_get_node(iter), \ __typeof__(*(pos)), member); \ - &(pos)->member != NULL; \ + cds_lfht_iter_get_node(iter) != NULL; \ cds_lfht_next_duplicate(ht, match, key, iter), \ pos = caa_container_of(cds_lfht_iter_get_node(iter), \ __typeof__(*(pos)), member))