X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;ds=sidebyside;f=urcu%2Frculfhash.h;h=5e149ef629de692fbc5b1f4aeed371269d18b2b4;hb=3883c0e5c31408fa15090c6e1ef1e0316530f773;hp=860ef3d1c2d05e3516ec4a8849c9d47b39f1371f;hpb=9357c41599e239897db0cc18e1fbaecd1065ebc0;p=urcu.git diff --git a/urcu/rculfhash.h b/urcu/rculfhash.h index 860ef3d..5e149ef 100644 --- a/urcu/rculfhash.h +++ b/urcu/rculfhash.h @@ -42,6 +42,11 @@ struct _cds_lfht_node { unsigned long reverse_hash; } __attribute__((aligned(4))); +/* + * struct cds_lfht_node can be embedded into a structure (as a field). + * caa_container_of() can be used to get the structure from the struct + * cds_lfht_node after a lookup. + */ struct cds_lfht_node { /* cache-hot for iteration */ struct _cds_lfht_node p; /* needs to be first field */ @@ -180,7 +185,7 @@ void cds_lfht_lookup(struct cds_lfht *ht, void *key, size_t key_len, struct cds_lfht_iter *iter); /* - * cds_lfht_next - get the next item with same key (after a lookup). + * cds_lfht_next_duplicate - get the next item with same key (after a lookup). * * Uses an iterator initialized by a lookup. * Sets *iter-node to the following node with same key. @@ -190,7 +195,7 @@ void cds_lfht_lookup(struct cds_lfht *ht, void *key, size_t key_len, * node returned by a previous cds_lfht_next. * Call with rcu_read_lock held. */ -void cds_lfht_next(struct cds_lfht *ht, struct cds_lfht_iter *iter); +void cds_lfht_next_duplicate(struct cds_lfht *ht, struct cds_lfht_iter *iter); /* * cds_lfht_add - add a node to the hash table.