Motr  M0
ext_xc.c
Go to the documentation of this file.
1 /* This file is automatically generated from lib/ext.h */
2 
3 #include "lib/misc.h" /* offsetof */
4 #include "lib/assert.h"
5 #include "xcode/xcode.h"
6 
7 #include "lib/ext.h"
8 #include "lib/ext_xc.h"
9 
11 
12 static struct _m0_ext_s {
15 } _m0_ext = {
16  ._type = {
18  .xct_name = "m0_ext",
19  .xct_sizeof = sizeof (struct m0_ext),
20  .xct_nr = 4,
22  }
23 };
24 
26 M0_BASSERT(offsetof(struct _m0_ext_s, _child[0]) ==
27  offsetof(struct m0_xcode_type, xct_child[0]));
28 
29 
30 M0_BASSERT(sizeof(struct m0_ext) == 48U);
31 
32 M0_BASSERT(sizeof ((struct m0_ext *)0)->e_header == 16U);
33 M0_BASSERT(offsetof(struct m0_ext, e_header) == 0U);
34 M0_BASSERT(sizeof ((struct m0_ext *)0)->e_start == 8U);
35 M0_BASSERT(offsetof(struct m0_ext, e_start) == 16U);
36 M0_BASSERT(sizeof ((struct m0_ext *)0)->e_end == 8U);
37 M0_BASSERT(offsetof(struct m0_ext, e_end) == 24U);
38 M0_BASSERT(sizeof ((struct m0_ext *)0)->e_footer == 16U);
39 M0_BASSERT(offsetof(struct m0_ext, e_footer) == 32U);
40 
41 
42 
43 M0_INTERNAL void m0_xc_m0_ext_struct_init(void)
44 {
45  _m0_ext._child[0] = (struct m0_xcode_field) {
46  .xf_name = "e_header",
47 
48  .xf_type = m0_format_header_xc,
49 
50  .xf_tag = 0,
51  .xf_opaque = NULL,
52  .xf_offset = offsetof(struct m0_ext, e_header),
53  .xf_read = NULL,
54  .xf_decor = {
56  }
57  };
59 
60  _m0_ext._child[1] = (struct m0_xcode_field) {
61  .xf_name = "e_start",
62 
63  .xf_type = &M0_XT_U64,
64 
65  .xf_tag = 0,
66  .xf_opaque = NULL,
67  .xf_offset = offsetof(struct m0_ext, e_start),
68  .xf_read = NULL,
69  .xf_decor = {
71  }
72  };
74 
75  _m0_ext._child[2] = (struct m0_xcode_field) {
76  .xf_name = "e_end",
77 
78  .xf_type = &M0_XT_U64,
79 
80  .xf_tag = 0,
81  .xf_opaque = NULL,
82  .xf_offset = offsetof(struct m0_ext, e_end),
83  .xf_read = NULL,
84  .xf_decor = {
86  }
87  };
89 
90  _m0_ext._child[3] = (struct m0_xcode_field) {
91  .xf_name = "e_footer",
92 
93  .xf_type = m0_format_footer_xc,
94 
95  .xf_tag = 0,
96  .xf_opaque = NULL,
97  .xf_offset = offsetof(struct m0_ext, e_footer),
98  .xf_read = NULL,
99  .xf_decor = {
101  }
102  };
104 
106 }
107 
108 M0_INTERNAL void m0_xc_lib_ext_init(void)
109 {
111 }
112 
113 M0_INTERNAL void m0_xc_lib_ext_fini(void)
114 {
115 }
struct m0_xcode_type _type
Definition: ext_xc.c:13
#define NULL
Definition: misc.h:38
struct m0_xcode_type * m0_ext_xc
Definition: ext_xc.c:10
M0_INTERNAL void m0_xc_m0_format_footer_struct_init(void)
Definition: format_xc.c:226
m0_bindex_t e_start
Definition: ext.h:96
struct m0_xcode_field xct_child[0]
Definition: xcode.h:345
struct m0_xcode_field _child[4]
Definition: ext_xc.c:14
M0_INTERNAL void m0_xc_lib_ext_fini(void)
Definition: ext_xc.c:113
struct m0_format_footer e_footer
Definition: ext.h:98
struct m0_format_header e_header
Definition: ext.h:95
M0_INTERNAL void m0_xc_lib_ext_init(void)
Definition: ext_xc.c:108
#define M0_POST(cond)
static struct _m0_ext_s _m0_ext
bool m0_xcode_type_invariant(const struct m0_xcode_type *xt)
Definition: xcode.c:74
M0_INTERNAL void m0_xc_m0_format_header_struct_init(void)
Definition: format_xc.c:191
void m0_xc_u64_init(void)
Definition: xcode.c:904
enum m0_xcode_aggr xct_aggr
Definition: xcode.h:316
struct m0_xcode_type * m0_format_header_xc
Definition: format_xc.c:10
Definition: ext.h:37
m0_bindex_t e_end
Definition: ext.h:97
M0_INTERNAL void m0_xc_m0_ext_struct_init(void)
Definition: ext_xc.c:43
const char * xf_name
Definition: xcode.h:251
const struct m0_xcode_type M0_XT_U64
Definition: xcode.c:940
#define offsetof(typ, memb)
Definition: misc.h:29
M0_BASSERT(offsetof(struct _m0_ext_s, _child[0])==offsetof(struct m0_xcode_type, xct_child[0]))
struct m0_xcode_type * m0_format_footer_xc
Definition: format_xc.c:11