Motr  M0
list_xc.c
Go to the documentation of this file.
1 /* This file is automatically generated from be/list.h */
2 
3 #include "lib/misc.h" /* offsetof */
4 #include "lib/assert.h"
5 #include "xcode/xcode.h"
6 
7 #include "be/list.h"
8 #include "be/list_xc.h"
9 
10 #if !defined(__KERNEL__)
12 #endif
13 #if !defined(__KERNEL__)
15 #endif
16 #if !defined(__KERNEL__)
18 #endif
19 
20 #if !defined(__KERNEL__)
21 static struct _m0_be_list_link_s {
24 } _m0_be_list_link = {
25  ._type = {
27  .xct_name = "m0_be_list_link",
28  .xct_sizeof = sizeof (struct m0_be_list_link),
29  .xct_nr = 2,
30  .xct_flags = M0_XCODE_TYPE_FLAG_DOM_BE,
31  }
32 };
33 
35 M0_BASSERT(offsetof(struct _m0_be_list_link_s, _child[0]) ==
36  offsetof(struct m0_xcode_type, xct_child[0]));
37 #endif
38 
39 #if !defined(__KERNEL__)
40 static struct _m0_be_list_head_s {
43 } _m0_be_list_head = {
44  ._type = {
46  .xct_name = "m0_be_list_head",
47  .xct_sizeof = sizeof (struct m0_be_list_head),
48  .xct_nr = 2,
49  .xct_flags = M0_XCODE_TYPE_FLAG_DOM_BE,
50  }
51 };
52 
54 M0_BASSERT(offsetof(struct _m0_be_list_head_s, _child[0]) ==
55  offsetof(struct m0_xcode_type, xct_child[0]));
56 #endif
57 
58 #if !defined(__KERNEL__)
59 static struct _m0_be_list_s {
62 } _m0_be_list = {
63  ._type = {
65  .xct_name = "m0_be_list",
66  .xct_sizeof = sizeof (struct m0_be_list),
67  .xct_nr = 4,
68  .xct_flags = M0_XCODE_TYPE_FLAG_DOM_BE,
69  }
70 };
71 
73 M0_BASSERT(offsetof(struct _m0_be_list_s, _child[0]) ==
74  offsetof(struct m0_xcode_type, xct_child[0]));
75 #endif
76 
77 
78 #if !defined(__KERNEL__)
79 M0_BASSERT(sizeof(struct m0_be_list_link) == 16U);
80 #endif
81 
82 #if !defined(__KERNEL__)
83 M0_BASSERT(sizeof ((struct m0_be_list_link *)0)->bll_next == 8U);
85 #endif
86 #if !defined(__KERNEL__)
87 M0_BASSERT(sizeof ((struct m0_be_list_link *)0)->bll_prev == 8U);
89 #endif
90 
91 #if !defined(__KERNEL__)
92 M0_BASSERT(sizeof(struct m0_be_list_head) == 16U);
93 #endif
94 
95 #if !defined(__KERNEL__)
96 M0_BASSERT(sizeof ((struct m0_be_list_head *)0)->blh_head == 8U);
98 #endif
99 #if !defined(__KERNEL__)
100 M0_BASSERT(sizeof ((struct m0_be_list_head *)0)->blh_tail == 8U);
102 #endif
103 
104 #if !defined(__KERNEL__)
105 M0_BASSERT(sizeof(struct m0_be_list) == 56U);
106 #endif
107 
108 #if !defined(__KERNEL__)
109 M0_BASSERT(sizeof ((struct m0_be_list *)0)->bl_format_header == 16U);
111 #endif
112 #if !defined(__KERNEL__)
113 M0_BASSERT(sizeof ((struct m0_be_list *)0)->bl_head == 16U);
114 M0_BASSERT(offsetof(struct m0_be_list, bl_head) == 16U);
115 #endif
116 #if !defined(__KERNEL__)
117 M0_BASSERT(sizeof ((struct m0_be_list *)0)->bl_magic == 8U);
118 M0_BASSERT(offsetof(struct m0_be_list, bl_magic) == 32U);
119 #endif
120 #if !defined(__KERNEL__)
121 M0_BASSERT(sizeof ((struct m0_be_list *)0)->bl_format_footer == 16U);
123 #endif
124 
125 
126 
127 #if !defined(__KERNEL__)
128 M0_INTERNAL void m0_xc_m0_be_list_link_struct_init(void)
129 {
130  _m0_be_list_link._child[0] = (struct m0_xcode_field) {
131  .xf_name = "bll_next",
132 #ifdef __KERNEL__
133  .xf_type = &M0_XT_VOID,
134 #else
135 
136  .xf_type = &M0_XT_U64,
137 #endif
138  .xf_tag = 0,
139  .xf_opaque = NULL,
140  .xf_offset = offsetof(struct m0_be_list_link, bll_next),
141  .xf_read = NULL,
142  .xf_decor = {
144  }
145  };
146 #if !defined(__KERNEL__)
147  m0_xc_u64_init();
148 #endif
149 
150  _m0_be_list_link._child[1] = (struct m0_xcode_field) {
151  .xf_name = "bll_prev",
152 #ifdef __KERNEL__
153  .xf_type = &M0_XT_VOID,
154 #else
155 
156  .xf_type = &M0_XT_U64,
157 #endif
158  .xf_tag = 0,
159  .xf_opaque = NULL,
160  .xf_offset = offsetof(struct m0_be_list_link, bll_prev),
161  .xf_read = NULL,
162  .xf_decor = {
164  }
165  };
166 #if !defined(__KERNEL__)
167  m0_xc_u64_init();
168 #endif
169 
171 }
172 #endif
173 
174 #if !defined(__KERNEL__)
175 M0_INTERNAL void m0_xc_m0_be_list_head_struct_init(void)
176 {
177  _m0_be_list_head._child[0] = (struct m0_xcode_field) {
178  .xf_name = "blh_head",
179 #ifdef __KERNEL__
180  .xf_type = &M0_XT_VOID,
181 #else
182 
183  .xf_type = &M0_XT_U64,
184 #endif
185  .xf_tag = 0,
186  .xf_opaque = NULL,
187  .xf_offset = offsetof(struct m0_be_list_head, blh_head),
188  .xf_read = NULL,
189  .xf_decor = {
191  }
192  };
193 #if !defined(__KERNEL__)
194  m0_xc_u64_init();
195 #endif
196 
197  _m0_be_list_head._child[1] = (struct m0_xcode_field) {
198  .xf_name = "blh_tail",
199 #ifdef __KERNEL__
200  .xf_type = &M0_XT_VOID,
201 #else
202 
203  .xf_type = &M0_XT_U64,
204 #endif
205  .xf_tag = 0,
206  .xf_opaque = NULL,
207  .xf_offset = offsetof(struct m0_be_list_head, blh_tail),
208  .xf_read = NULL,
209  .xf_decor = {
211  }
212  };
213 #if !defined(__KERNEL__)
214  m0_xc_u64_init();
215 #endif
216 
218 }
219 #endif
220 
221 #if !defined(__KERNEL__)
222 M0_INTERNAL void m0_xc_m0_be_list_struct_init(void)
223 {
224  _m0_be_list._child[0] = (struct m0_xcode_field) {
225  .xf_name = "bl_format_header",
226 
227  .xf_type = m0_format_header_xc,
228 
229  .xf_tag = 0,
230  .xf_opaque = NULL,
231  .xf_offset = offsetof(struct m0_be_list, bl_format_header),
232  .xf_read = NULL,
233  .xf_decor = {
235  }
236  };
238 
239  _m0_be_list._child[1] = (struct m0_xcode_field) {
240  .xf_name = "bl_head",
241 #ifdef __KERNEL__
242  .xf_type = &M0_XT_VOID,
243 #else
244 
245  .xf_type = m0_be_list_head_xc,
246 #endif
247  .xf_tag = 0,
248  .xf_opaque = NULL,
249  .xf_offset = offsetof(struct m0_be_list, bl_head),
250  .xf_read = NULL,
251  .xf_decor = {
253  }
254  };
255 #if !defined(__KERNEL__)
257 #endif
258 
259  _m0_be_list._child[2] = (struct m0_xcode_field) {
260  .xf_name = "bl_magic",
261 
262  .xf_type = &M0_XT_U64,
263 
264  .xf_tag = 0,
265  .xf_opaque = NULL,
266  .xf_offset = offsetof(struct m0_be_list, bl_magic),
267  .xf_read = NULL,
268  .xf_decor = {
270  }
271  };
272  m0_xc_u64_init();
273 
274  _m0_be_list._child[3] = (struct m0_xcode_field) {
275  .xf_name = "bl_format_footer",
276 
277  .xf_type = m0_format_footer_xc,
278 
279  .xf_tag = 0,
280  .xf_opaque = NULL,
281  .xf_offset = offsetof(struct m0_be_list, bl_format_footer),
282  .xf_read = NULL,
283  .xf_decor = {
285  }
286  };
288 
290 }
291 #endif
292 
293 M0_INTERNAL void m0_xc_be_list_init(void)
294 {
295 #if !defined(__KERNEL__)
297 #endif
298 #if !defined(__KERNEL__)
300 #endif
301 #if !defined(__KERNEL__)
303 #endif
304 }
305 
306 M0_INTERNAL void m0_xc_be_list_fini(void)
307 {
308 }
static struct _m0_be_list_s _m0_be_list
#define NULL
Definition: misc.h:38
struct m0_be_list_link * bll_prev
Definition: list.h:490
M0_INTERNAL void m0_xc_m0_format_footer_struct_init(void)
Definition: format_xc.c:226
struct m0_xcode_type * m0_be_list_head_xc
Definition: list_xc.c:14
M0_INTERNAL void m0_xc_m0_be_list_link_struct_init(void)
Definition: list_xc.c:128
struct m0_xcode_field xct_child[0]
Definition: xcode.h:345
struct m0_xcode_type * m0_be_list_link_xc
Definition: list_xc.c:11
struct m0_xcode_field _child[2]
Definition: list_xc.c:42
M0_INTERNAL void m0_xc_m0_be_list_head_struct_init(void)
Definition: list_xc.c:175
static struct _m0_be_list_link_s _m0_be_list_link
struct m0_be_list_link * blh_head
Definition: list.h:489
struct m0_be_list_head bl_head
Definition: list.h:490
M0_BASSERT(offsetof(struct _m0_be_list_link_s, _child[0])==offsetof(struct m0_xcode_type, xct_child[0]))
const struct m0_xcode_type M0_XT_VOID
Definition: xcode.c:916
struct m0_xcode_type _type
Definition: list_xc.c:41
static struct _m0_be_list_head_s _m0_be_list_head
#define M0_POST(cond)
struct m0_be_list_link * blh_tail
Definition: list.h:490
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
struct m0_format_footer bl_format_footer
Definition: list.h:492
struct m0_be_list_link * bll_next
Definition: list.h:489
void m0_xc_u64_init(void)
Definition: xcode.c:904
M0_INTERNAL void m0_xc_m0_be_list_struct_init(void)
Definition: list_xc.c:222
struct m0_xcode_field _child[4]
Definition: list_xc.c:61
enum m0_xcode_aggr xct_aggr
Definition: xcode.h:316
struct m0_xcode_type * m0_format_header_xc
Definition: format_xc.c:10
struct m0_format_header bl_format_header
Definition: list.h:489
M0_INTERNAL void m0_xc_be_list_init(void)
Definition: list_xc.c:293
M0_INTERNAL void m0_xc_be_list_fini(void)
Definition: list_xc.c:306
struct m0_xcode_type * m0_be_list_xc
Definition: list_xc.c:17
uint64_t bl_magic
Definition: list.h:491
const char * xf_name
Definition: xcode.h:251
struct m0_xcode_type _type
Definition: list_xc.c:60
const struct m0_xcode_type M0_XT_U64
Definition: xcode.c:940
#define offsetof(typ, memb)
Definition: misc.h:29
struct m0_xcode_type * m0_format_footer_xc
Definition: format_xc.c:11