Document caa_container_of
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 23 Aug 2011 21:22:00 +0000 (17:22 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 23 Aug 2011 21:22:00 +0000 (17:22 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
urcu/compiler.h

index 489677b3aefe1ad6dd294006d903721f375f66a7..f8fce5a6b46558fa4a4b2d50f78f91eecf229c90 100644 (file)
 #define CAA_BITS_PER_LONG      32
 #endif
 
-#define caa_container_of(ptr, type, member)                                    \
+/*
+ * caa_container_of - Get the address of an object containing a field.
+ *
+ * @ptr: pointer to the field.
+ * @type: type of the object.
+ * @member: name of the field within the object.
+ */
+#define caa_container_of(ptr, type, member)                            \
        ({                                                              \
-               const typeof(((type *)NULL)->member) * __ptr = (ptr);   \
+               const typeof(((type *) NULL)->member) * __ptr = (ptr);  \
                (type *)((char *)__ptr - offsetof(type, member));       \
        })
 
This page took 0.025996 seconds and 4 git commands to generate.