/** * libeth_cacheline_struct_assert - make sure CL-based struct size is expected * @type: type of the struct * @...: from 1 to 3 CL group sizes (read-mostly, read-write, cold) * * When a struct contains several CL groups, it's difficult to predict its size * on different architectures. The macro instead takes sizes of all of the * groups the structure contains and generates the final struct size.
*/ #define libeth_cacheline_struct_assert(type, ...) \
__libeth_cacheline_struct_assert(type, __libeth_cls(__VA_ARGS__)); \
static_assert(__alignof(type) >= SMP_CACHE_BYTES)
/** * libeth_cacheline_set_assert - make sure CL-based struct layout is expected * @type: type of the struct * @ro: expected size of the read-mostly group * @rw: expected size of the read-write group * @c: expected size of the cold group * * Check that each group size is expected and then do final struct size check.
*/ #define libeth_cacheline_set_assert(type, ro, rw, c) \
libeth_cacheline_group_assert(type, read_mostly, ro); \
libeth_cacheline_group_assert(type, read_write, rw); \
libeth_cacheline_group_assert(type, cold, c); \
libeth_cacheline_struct_assert(type, ro, rw, c)
#endif/* __LIBETH_CACHE_H */
Messung V0.5
¤ Dauer der Verarbeitung: 0.9 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.