From: Mathieu Desnoyers Date: Tue, 27 Sep 2011 15:19:21 +0000 (-0400) Subject: rculfhash: document use of caa_container_of() X-Git-Tag: v0.7.0~43^2~121 X-Git-Url: http://git.liburcu.org/?p=urcu.git;a=commitdiff_plain;h=ae62aa6a78193cb15ff51b9611e1438047f94d3f rculfhash: document use of caa_container_of() Signed-off-by: Mathieu Desnoyers --- diff --git a/urcu/rculfhash.h b/urcu/rculfhash.h index 860ef3d..a08f043 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 */