From ae62aa6a78193cb15ff51b9611e1438047f94d3f Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Tue, 27 Sep 2011 11:19:21 -0400 Subject: [PATCH] rculfhash: document use of caa_container_of() Signed-off-by: Mathieu Desnoyers --- urcu/rculfhash.h | 5 +++++ 1 file changed, 5 insertions(+) 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 */ -- 2.34.1