summaryrefslogtreecommitdiff
path: root/include/linux/kernel.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/kernel.h')
-rw-r--r--include/linux/kernel.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index a55b8a9b..01466c40 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -96,6 +96,14 @@
(type *)((char *)__mptr - offsetof(type, member)); })
#endif
+#define __struct_group(TAG, NAME, ATTRS, MEMBERS...) \
+ union { \
+ struct { MEMBERS } ATTRS; \
+ struct TAG { MEMBERS } ATTRS NAME; \
+ }
+#define struct_group(NAME, MEMBERS...) \
+ __struct_group(/* no tag */, NAME, /* no attrs */, MEMBERS)
+
#define max(x, y) ({ \
typeof(x) _max1 = (x); \
typeof(y) _max2 = (y); \