Motr  M0
layout_xc.c
Go to the documentation of this file.
1 /* This file is automatically generated from dix/layout.h */
2 
3 #include "lib/misc.h" /* offsetof */
4 #include "lib/assert.h"
5 #include "xcode/xcode.h"
6 
7 #include "dix/layout.h"
8 #include "dix/layout_xc.h"
9 
15 
16 static struct _m0_dix_ldesc_s {
19 } _m0_dix_ldesc = {
20  ._type = {
22  .xct_name = "m0_dix_ldesc",
23  .xct_sizeof = sizeof (struct m0_dix_ldesc),
24  .xct_nr = 3,
25  .xct_flags = M0_XCODE_TYPE_FLAG_DOM_RPC,
26  }
27 };
28 
30 M0_BASSERT(offsetof(struct _m0_dix_ldesc_s, _child[0]) ==
31  offsetof(struct m0_xcode_type, xct_child[0]));
32 
33 static struct _m0_dix_capture_ldesc_s {
37  ._type = {
39  .xct_name = "m0_dix_capture_ldesc",
40  .xct_sizeof = sizeof (struct m0_dix_capture_ldesc),
41  .xct_nr = 3,
42  .xct_flags = M0_XCODE_TYPE_FLAG_DOM_RPC,
43  }
44 };
45 
47 M0_BASSERT(offsetof(struct _m0_dix_capture_ldesc_s, _child[0]) ==
48  offsetof(struct m0_xcode_type, xct_child[0]));
49 
54  ._type = {
56  .xct_name = "m0_dix_composite_layer",
57  .xct_sizeof = sizeof (struct m0_dix_composite_layer),
58  .xct_nr = 3,
59  .xct_flags = M0_XCODE_TYPE_FLAG_DOM_RPC,
60  }
61 };
62 
64 M0_BASSERT(offsetof(struct _m0_dix_composite_layer_s, _child[0]) ==
65  offsetof(struct m0_xcode_type, xct_child[0]));
66 
71  ._type = {
73  .xct_name = "m0_dix_composite_ldesc",
74  .xct_sizeof = sizeof (struct m0_dix_composite_ldesc),
75  .xct_nr = 2,
76  .xct_flags = M0_XCODE_TYPE_FLAG_DOM_RPC,
77  }
78 };
79 
81 M0_BASSERT(offsetof(struct _m0_dix_composite_ldesc_s, _child[0]) ==
82  offsetof(struct m0_xcode_type, xct_child[0]));
83 
84 static struct _m0_dix_layout_s {
87 } _m0_dix_layout = {
88  ._type = {
90  .xct_name = "m0_dix_layout",
91  .xct_sizeof = sizeof (struct m0_dix_layout),
92  .xct_nr = 5,
93  .xct_flags = M0_XCODE_TYPE_FLAG_DOM_RPC,
94  }
95 };
96 
98 M0_BASSERT(offsetof(struct _m0_dix_layout_s, _child[0]) ==
99  offsetof(struct m0_xcode_type, xct_child[0]));
100 
101 
102 M0_BASSERT(sizeof(struct m0_dix_ldesc) == 40U);
103 
104 M0_BASSERT(sizeof ((struct m0_dix_ldesc *)0)->ld_hash_fnc == 4U);
106 M0_BASSERT(sizeof ((struct m0_dix_ldesc *)0)->ld_pver == 16U);
107 M0_BASSERT(offsetof(struct m0_dix_ldesc, ld_pver) == 8U);
108 M0_BASSERT(sizeof ((struct m0_dix_ldesc *)0)->ld_imask == 16U);
109 M0_BASSERT(offsetof(struct m0_dix_ldesc, ld_imask) == 24U);
110 
111 M0_BASSERT(sizeof(struct m0_dix_capture_ldesc) == 40U);
112 
113 M0_BASSERT(sizeof ((struct m0_dix_capture_ldesc *)0)->ca_orig_id == 16U);
115 M0_BASSERT(sizeof ((struct m0_dix_capture_ldesc *)0)->ca_pver == 16U);
117 M0_BASSERT(sizeof ((struct m0_dix_capture_ldesc *)0)->ca_lid == 8U);
119 
120 M0_BASSERT(sizeof(struct m0_dix_composite_layer) == 32U);
121 
122 M0_BASSERT(sizeof ((struct m0_dix_composite_layer *)0)->cr_subobj == 16U);
124 M0_BASSERT(sizeof ((struct m0_dix_composite_layer *)0)->cr_lid == 8U);
126 M0_BASSERT(sizeof ((struct m0_dix_composite_layer *)0)->cr_priority == 4U);
128 
129 M0_BASSERT(sizeof(struct m0_dix_composite_ldesc) == 16U);
130 
131 M0_BASSERT(sizeof ((struct m0_dix_composite_ldesc *)0)->cld_nr_layers == 4U);
133 M0_BASSERT(sizeof ((struct m0_dix_composite_ldesc *)0)->cld_layers == 8U);
135 
136 M0_BASSERT(sizeof(struct m0_dix_layout) == 48U);
137 
138 M0_BASSERT(sizeof ((struct m0_dix_layout *)0)->dl_type == 4U);
139 M0_BASSERT(offsetof(struct m0_dix_layout, dl_type) == 0U);
140 M0_BASSERT(sizeof ((struct m0_dix_layout *)0)->u.dl_id == 8U);
141 M0_BASSERT(offsetof(struct m0_dix_layout, u.dl_id) == 8U);
142 M0_BASSERT(sizeof ((struct m0_dix_layout *)0)->u.dl_desc == 40U);
143 M0_BASSERT(offsetof(struct m0_dix_layout, u.dl_desc) == 8U);
144 M0_BASSERT(sizeof ((struct m0_dix_layout *)0)->u.dl_cap_desc == 40U);
145 M0_BASSERT(offsetof(struct m0_dix_layout, u.dl_cap_desc) == 8U);
146 M0_BASSERT(sizeof ((struct m0_dix_layout *)0)->u.dl_comp_desc == 16U);
147 M0_BASSERT(offsetof(struct m0_dix_layout, u.dl_comp_desc) == 8U);
148 
149 
150 
151 M0_INTERNAL void m0_xc_m0_dix_ldesc_struct_init(void)
152 {
153  _m0_dix_ldesc._child[0] = (struct m0_xcode_field) {
154  .xf_name = "ld_hash_fnc",
155 
156  .xf_type = &M0_XT_U32,
157 
158  .xf_tag = 0,
159  .xf_opaque = NULL,
160  .xf_offset = offsetof(struct m0_dix_ldesc, ld_hash_fnc),
161  .xf_read = NULL,
162  .xf_decor = {
164  }
165  };
166  m0_xc_u32_init();
167 
168  _m0_dix_ldesc._child[1] = (struct m0_xcode_field) {
169  .xf_name = "ld_pver",
170 
171  .xf_type = m0_fid_xc,
172 
173  .xf_tag = 0,
174  .xf_opaque = NULL,
175  .xf_offset = offsetof(struct m0_dix_ldesc, ld_pver),
176  .xf_read = NULL,
177  .xf_decor = {
179  }
180  };
182 
183  _m0_dix_ldesc._child[2] = (struct m0_xcode_field) {
184  .xf_name = "ld_imask",
185 
186  .xf_type = m0_dix_imask_xc,
187 
188  .xf_tag = 0,
189  .xf_opaque = NULL,
190  .xf_offset = offsetof(struct m0_dix_ldesc, ld_imask),
191  .xf_read = NULL,
192  .xf_decor = {
194  }
195  };
197 
199 }
200 
202 {
204  .xf_name = "ca_orig_id",
205 
206  .xf_type = m0_uint128_xc,
207 
208  .xf_tag = 0,
209  .xf_opaque = NULL,
210  .xf_offset = offsetof(struct m0_dix_capture_ldesc, ca_orig_id),
211  .xf_read = NULL,
212  .xf_decor = {
214  }
215  };
217 
219  .xf_name = "ca_pver",
220 
221  .xf_type = m0_fid_xc,
222 
223  .xf_tag = 0,
224  .xf_opaque = NULL,
225  .xf_offset = offsetof(struct m0_dix_capture_ldesc, ca_pver),
226  .xf_read = NULL,
227  .xf_decor = {
229  }
230  };
232 
234  .xf_name = "ca_lid",
235 
236  .xf_type = &M0_XT_U64,
237 
238  .xf_tag = 0,
239  .xf_opaque = NULL,
240  .xf_offset = offsetof(struct m0_dix_capture_ldesc, ca_lid),
241  .xf_read = NULL,
242  .xf_decor = {
244  }
245  };
246  m0_xc_u64_init();
247 
249 }
250 
252 {
254  .xf_name = "cr_subobj",
255 
256  .xf_type = m0_uint128_xc,
257 
258  .xf_tag = 0,
259  .xf_opaque = NULL,
260  .xf_offset = offsetof(struct m0_dix_composite_layer, cr_subobj),
261  .xf_read = NULL,
262  .xf_decor = {
264  }
265  };
267 
269  .xf_name = "cr_lid",
270 
271  .xf_type = &M0_XT_U64,
272 
273  .xf_tag = 0,
274  .xf_opaque = NULL,
275  .xf_offset = offsetof(struct m0_dix_composite_layer, cr_lid),
276  .xf_read = NULL,
277  .xf_decor = {
279  }
280  };
281  m0_xc_u64_init();
282 
284  .xf_name = "cr_priority",
285 
286  .xf_type = &M0_XT_U32,
287 
288  .xf_tag = 0,
289  .xf_opaque = NULL,
290  .xf_offset = offsetof(struct m0_dix_composite_layer, cr_priority),
291  .xf_read = NULL,
292  .xf_decor = {
294  }
295  };
296  m0_xc_u32_init();
297 
299 }
300 
302 {
304  .xf_name = "cld_nr_layers",
305 
306  .xf_type = &M0_XT_U32,
307 
308  .xf_tag = 0,
309  .xf_opaque = NULL,
310  .xf_offset = offsetof(struct m0_dix_composite_ldesc, cld_nr_layers),
311  .xf_read = NULL,
312  .xf_decor = {
314  }
315  };
316  m0_xc_u32_init();
317 
319  .xf_name = "cld_layers",
320 
321  .xf_type = m0_dix_composite_layer_xc,
322 
323  .xf_tag = 0,
324  .xf_opaque = NULL,
325  .xf_offset = offsetof(struct m0_dix_composite_ldesc, cld_layers),
326  .xf_read = NULL,
327  .xf_decor = {
329  }
330  };
332 
334 }
335 
336 M0_INTERNAL void m0_xc_m0_dix_layout_struct_init(void)
337 {
338  _m0_dix_layout._child[0] = (struct m0_xcode_field) {
339  .xf_name = "dl_type",
340 
341  .xf_type = &M0_XT_U32,
342 
343  .xf_tag = 0,
344  .xf_opaque = NULL,
345  .xf_offset = offsetof(struct m0_dix_layout, dl_type),
346  .xf_read = NULL,
347  .xf_decor = {
349  }
350  };
351  m0_xc_u32_init();
352 
353  _m0_dix_layout._child[1] = (struct m0_xcode_field) {
354  .xf_name = "dl_id",
355 
356  .xf_type = &M0_XT_U64,
357 
358  .xf_tag = DIX_LTYPE_ID,
359  .xf_opaque = NULL,
360  .xf_offset = offsetof(struct m0_dix_layout, u.dl_id),
361  .xf_read = NULL,
362  .xf_decor = {
364  }
365  };
366  m0_xc_u64_init();
367 
368  _m0_dix_layout._child[2] = (struct m0_xcode_field) {
369  .xf_name = "dl_desc",
370 
371  .xf_type = m0_dix_ldesc_xc,
372 
373  .xf_tag = DIX_LTYPE_DESCR,
374  .xf_opaque = NULL,
375  .xf_offset = offsetof(struct m0_dix_layout, u.dl_desc),
376  .xf_read = NULL,
377  .xf_decor = {
379  }
380  };
382 
383  _m0_dix_layout._child[3] = (struct m0_xcode_field) {
384  .xf_name = "dl_cap_desc",
385 
386  .xf_type = m0_dix_capture_ldesc_xc,
387 
388  .xf_tag = DIX_LTYPE_CAPTURE_DESCR,
389  .xf_opaque = NULL,
390  .xf_offset = offsetof(struct m0_dix_layout, u.dl_cap_desc),
391  .xf_read = NULL,
392  .xf_decor = {
394  }
395  };
397 
398  _m0_dix_layout._child[4] = (struct m0_xcode_field) {
399  .xf_name = "dl_comp_desc",
400 
401  .xf_type = m0_dix_composite_ldesc_xc,
402 
403  .xf_tag = DIX_LTYPE_COMPOSITE_DESCR,
404  .xf_opaque = NULL,
405  .xf_offset = offsetof(struct m0_dix_layout, u.dl_comp_desc),
406  .xf_read = NULL,
407  .xf_decor = {
409  }
410  };
412 
414 }
415 
416 M0_INTERNAL void m0_xc_dix_layout_init(void)
417 {
423 }
424 
425 M0_INTERNAL void m0_xc_dix_layout_fini(void)
426 {
427 }
struct m0_xcode_type _type
Definition: layout_xc.c:51
struct m0_xcode_field _child[3]
Definition: layout_xc.c:35
M0_INTERNAL void m0_xc_m0_dix_layout_struct_init(void)
Definition: layout_xc.c:336
M0_INTERNAL void m0_xc_m0_dix_composite_layer_struct_init(void)
Definition: layout_xc.c:251
struct m0_fid ld_pver
Definition: layout.h:324
#define NULL
Definition: misc.h:38
M0_INTERNAL void m0_xc_m0_dix_capture_ldesc_struct_init(void)
Definition: layout_xc.c:201
M0_INTERNAL void m0_xc_m0_dix_ldesc_struct_init(void)
Definition: layout_xc.c:151
uint64_t ca_lid
Definition: layout.h:325
union @126 u
struct m0_xcode_type * m0_uint128_xc
Definition: types_xc.c:10
struct m0_xcode_field _child[3]
Definition: layout_xc.c:52
struct m0_xcode_type * m0_dix_capture_ldesc_xc
Definition: layout_xc.c:11
struct m0_xcode_type * m0_dix_layout_xc
Definition: layout_xc.c:14
struct m0_xcode_field xct_child[0]
Definition: xcode.h:345
M0_INTERNAL void m0_xc_dix_layout_init(void)
Definition: layout_xc.c:416
M0_INTERNAL void m0_xc_m0_fid_struct_init(void)
Definition: fid_xc.c:64
M0_INTERNAL void m0_xc_m0_uint128_struct_init(void)
Definition: types_xc.c:39
static struct _m0_dix_composite_layer_s _m0_dix_composite_layer
struct m0_xcode_type * m0_dix_composite_layer_xc
Definition: layout_xc.c:12
struct m0_xcode_type * m0_dix_ldesc_xc
Definition: layout_xc.c:10
struct m0_xcode_type _type
Definition: layout_xc.c:17
static struct _m0_dix_layout_s _m0_dix_layout
struct m0_dix_imask ld_imask
Definition: layout.h:325
uint32_t ld_hash_fnc
Definition: layout.h:323
static struct _m0_dix_ldesc_s _m0_dix_ldesc
uint32_t dl_type
Definition: layout.h:323
uint64_t cr_lid
Definition: layout.h:324
#define M0_POST(cond)
struct m0_xcode_type * m0_dix_composite_ldesc_xc
Definition: layout_xc.c:13
bool m0_xcode_type_invariant(const struct m0_xcode_type *xt)
Definition: xcode.c:74
struct m0_xcode_field _child[2]
Definition: layout_xc.c:69
M0_BASSERT(offsetof(struct _m0_dix_ldesc_s, _child[0])==offsetof(struct m0_xcode_type, xct_child[0]))
M0_INTERNAL void m0_xc_m0_dix_imask_struct_init(void)
Definition: imask_xc.c:39
struct m0_xcode_type _type
Definition: layout_xc.c:34
void m0_xc_u64_init(void)
Definition: xcode.c:904
struct m0_dix_composite_layer * cld_layers
Definition: layout.h:324
M0_INTERNAL void m0_xc_m0_dix_composite_ldesc_struct_init(void)
Definition: layout_xc.c:301
const struct m0_xcode_type M0_XT_U32
Definition: xcode.c:932
enum m0_xcode_aggr xct_aggr
Definition: xcode.h:316
struct m0_uint128 cr_subobj
Definition: layout.h:323
static struct _m0_dix_composite_ldesc_s _m0_dix_composite_ldesc
struct m0_xcode_type _type
Definition: layout_xc.c:85
struct m0_uint128 ca_orig_id
Definition: layout.h:323
void m0_xc_u32_init(void)
Definition: xcode.c:900
struct m0_xcode_field _child[5]
Definition: layout_xc.c:86
struct m0_xcode_type * m0_dix_imask_xc
Definition: imask_xc.c:10
static struct _m0_dix_capture_ldesc_s _m0_dix_capture_ldesc
const char * xf_name
Definition: xcode.h:251
int cld_nr_layers
Definition: layout.h:323
struct m0_xcode_field _child[3]
Definition: layout_xc.c:18
struct m0_xcode_type * m0_fid_xc
Definition: fid_xc.c:10
struct m0_fid ca_pver
Definition: layout.h:324
const struct m0_xcode_type M0_XT_U64
Definition: xcode.c:940
#define offsetof(typ, memb)
Definition: misc.h:29
struct m0_xcode_type _type
Definition: layout_xc.c:68
M0_INTERNAL void m0_xc_dix_layout_fini(void)
Definition: layout_xc.c:425
int cr_priority
Definition: layout.h:325