Motr  M0
io_fop_xc.c
Go to the documentation of this file.
1 /* This file is automatically generated from reqh/ut/io_fop.h */
2 
3 #include "lib/misc.h" /* offsetof */
4 #include "lib/assert.h"
5 #include "xcode/xcode.h"
6 
7 #include "reqh/ut/io_fop.h"
8 #include "reqh/ut/io_fop_xc.h"
9 
18 
19 static struct _stob_io_fop_fid_s {
22 } _stob_io_fop_fid = {
23  ._type = {
25  .xct_name = "stob_io_fop_fid",
26  .xct_sizeof = sizeof (struct stob_io_fop_fid),
27  .xct_nr = 2,
28  .xct_flags = 0,
29  }
30 };
31 
33 M0_BASSERT(offsetof(struct _stob_io_fop_fid_s, _child[0]) ==
34  offsetof(struct m0_xcode_type, xct_child[0]));
35 
36 static struct _m0_fi_value_s {
39 } _m0_fi_value = {
40  ._type = {
42  .xct_name = "m0_fi_value",
43  .xct_sizeof = sizeof (struct m0_fi_value),
44  .xct_nr = 2,
45  .xct_flags = 0,
46  }
47 };
48 
50 M0_BASSERT(offsetof(struct _m0_fi_value_s, _child[0]) ==
51  offsetof(struct m0_xcode_type, xct_child[0]));
52 
53 static struct _m0_stob_io_write_s {
57  ._type = {
59  .xct_name = "m0_stob_io_write",
60  .xct_sizeof = sizeof (struct m0_stob_io_write),
61  .xct_nr = 2,
62  .xct_flags = 0,
63  }
64 };
65 
67 M0_BASSERT(offsetof(struct _m0_stob_io_write_s, _child[0]) ==
68  offsetof(struct m0_xcode_type, xct_child[0]));
69 
70 static struct _m0_stob_io_write_rep_s {
74  ._type = {
76  .xct_name = "m0_stob_io_write_rep",
77  .xct_sizeof = sizeof (struct m0_stob_io_write_rep),
78  .xct_nr = 2,
79  .xct_flags = 0,
80  }
81 };
82 
84 M0_BASSERT(offsetof(struct _m0_stob_io_write_rep_s, _child[0]) ==
85  offsetof(struct m0_xcode_type, xct_child[0]));
86 
87 static struct _m0_stob_io_read_s {
90 } _m0_stob_io_read = {
91  ._type = {
93  .xct_name = "m0_stob_io_read",
94  .xct_sizeof = sizeof (struct m0_stob_io_read),
95  .xct_nr = 1,
96  .xct_flags = 0,
97  }
98 };
99 
101 M0_BASSERT(offsetof(struct _m0_stob_io_read_s, _child[0]) ==
102  offsetof(struct m0_xcode_type, xct_child[0]));
103 
104 static struct _m0_stob_io_read_rep_s {
108  ._type = {
110  .xct_name = "m0_stob_io_read_rep",
111  .xct_sizeof = sizeof (struct m0_stob_io_read_rep),
112  .xct_nr = 3,
113  .xct_flags = 0,
114  }
115 };
116 
118 M0_BASSERT(offsetof(struct _m0_stob_io_read_rep_s, _child[0]) ==
119  offsetof(struct m0_xcode_type, xct_child[0]));
120 
121 static struct _m0_stob_io_create_s {
124 } _m0_stob_io_create = {
125  ._type = {
127  .xct_name = "m0_stob_io_create",
128  .xct_sizeof = sizeof (struct m0_stob_io_create),
129  .xct_nr = 1,
130  .xct_flags = 0,
131  }
132 };
133 
135 M0_BASSERT(offsetof(struct _m0_stob_io_create_s, _child[0]) ==
136  offsetof(struct m0_xcode_type, xct_child[0]));
137 
142  ._type = {
144  .xct_name = "m0_stob_io_create_rep",
145  .xct_sizeof = sizeof (struct m0_stob_io_create_rep),
146  .xct_nr = 1,
147  .xct_flags = 0,
148  }
149 };
150 
152 M0_BASSERT(offsetof(struct _m0_stob_io_create_rep_s, _child[0]) ==
153  offsetof(struct m0_xcode_type, xct_child[0]));
154 
155 
156 M0_BASSERT(sizeof(struct stob_io_fop_fid) == 16U);
157 
158 M0_BASSERT(sizeof ((struct stob_io_fop_fid *)0)->f_seq == 8U);
159 M0_BASSERT(offsetof(struct stob_io_fop_fid, f_seq) == 0U);
160 M0_BASSERT(sizeof ((struct stob_io_fop_fid *)0)->f_oid == 8U);
161 M0_BASSERT(offsetof(struct stob_io_fop_fid, f_oid) == 8U);
162 
163 M0_BASSERT(sizeof(struct m0_fi_value) == 16U);
164 
165 M0_BASSERT(sizeof ((struct m0_fi_value *)0)->fi_count == 4U);
166 M0_BASSERT(offsetof(struct m0_fi_value, fi_count) == 0U);
167 M0_BASSERT(sizeof ((struct m0_fi_value *)0)->fi_buf == 8U);
168 M0_BASSERT(offsetof(struct m0_fi_value, fi_buf) == 8U);
169 
170 M0_BASSERT(sizeof(struct m0_stob_io_write) == 32U);
171 
172 M0_BASSERT(sizeof ((struct m0_stob_io_write *)0)->fiw_object == 16U);
173 M0_BASSERT(offsetof(struct m0_stob_io_write, fiw_object) == 0U);
174 M0_BASSERT(sizeof ((struct m0_stob_io_write *)0)->fiw_value == 16U);
175 M0_BASSERT(offsetof(struct m0_stob_io_write, fiw_value) == 16U);
176 
177 M0_BASSERT(sizeof(struct m0_stob_io_write_rep) == 8U);
178 
179 M0_BASSERT(sizeof ((struct m0_stob_io_write_rep *)0)->fiwr_rc == 4U);
180 M0_BASSERT(offsetof(struct m0_stob_io_write_rep, fiwr_rc) == 0U);
181 M0_BASSERT(sizeof ((struct m0_stob_io_write_rep *)0)->fiwr_count == 4U);
182 M0_BASSERT(offsetof(struct m0_stob_io_write_rep, fiwr_count) == 4U);
183 
184 M0_BASSERT(sizeof(struct m0_stob_io_read) == 16U);
185 
186 M0_BASSERT(sizeof ((struct m0_stob_io_read *)0)->fir_object == 16U);
187 M0_BASSERT(offsetof(struct m0_stob_io_read, fir_object) == 0U);
188 
189 M0_BASSERT(sizeof(struct m0_stob_io_read_rep) == 24U);
190 
191 M0_BASSERT(sizeof ((struct m0_stob_io_read_rep *)0)->firr_rc == 4U);
192 M0_BASSERT(offsetof(struct m0_stob_io_read_rep, firr_rc) == 0U);
193 M0_BASSERT(sizeof ((struct m0_stob_io_read_rep *)0)->firr_count == 4U);
194 M0_BASSERT(offsetof(struct m0_stob_io_read_rep, firr_count) == 4U);
195 M0_BASSERT(sizeof ((struct m0_stob_io_read_rep *)0)->firr_value == 16U);
196 M0_BASSERT(offsetof(struct m0_stob_io_read_rep, firr_value) == 8U);
197 
198 M0_BASSERT(sizeof(struct m0_stob_io_create) == 16U);
199 
200 M0_BASSERT(sizeof ((struct m0_stob_io_create *)0)->fic_object == 16U);
201 M0_BASSERT(offsetof(struct m0_stob_io_create, fic_object) == 0U);
202 
203 M0_BASSERT(sizeof(struct m0_stob_io_create_rep) == 4U);
204 
205 M0_BASSERT(sizeof ((struct m0_stob_io_create_rep *)0)->ficr_rc == 4U);
206 M0_BASSERT(offsetof(struct m0_stob_io_create_rep, ficr_rc) == 0U);
207 
208 
209 
210 M0_INTERNAL void m0_xc_stob_io_fop_fid_struct_init(void)
211 {
212  _stob_io_fop_fid._child[0] = (struct m0_xcode_field) {
213  .xf_name = "f_seq",
214 
215  .xf_type = &M0_XT_U64,
216 
217  .xf_tag = 0,
218  .xf_opaque = NULL,
219  .xf_offset = offsetof(struct stob_io_fop_fid, f_seq),
220  .xf_read = NULL,
221  .xf_decor = {
223  }
224  };
225  m0_xc_u64_init();
226 
227  _stob_io_fop_fid._child[1] = (struct m0_xcode_field) {
228  .xf_name = "f_oid",
229 
230  .xf_type = &M0_XT_U64,
231 
232  .xf_tag = 0,
233  .xf_opaque = NULL,
234  .xf_offset = offsetof(struct stob_io_fop_fid, f_oid),
235  .xf_read = NULL,
236  .xf_decor = {
238  }
239  };
240  m0_xc_u64_init();
241 
243 }
244 
245 M0_INTERNAL void m0_xc_m0_fi_value_struct_init(void)
246 {
247  _m0_fi_value._child[0] = (struct m0_xcode_field) {
248  .xf_name = "fi_count",
249 
250  .xf_type = &M0_XT_U32,
251 
252  .xf_tag = 0,
253  .xf_opaque = NULL,
254  .xf_offset = offsetof(struct m0_fi_value, fi_count),
255  .xf_read = NULL,
256  .xf_decor = {
258  }
259  };
260  m0_xc_u32_init();
261 
262  _m0_fi_value._child[1] = (struct m0_xcode_field) {
263  .xf_name = "fi_buf",
264 
265  .xf_type = &M0_XT_U8,
266 
267  .xf_tag = 0,
268  .xf_opaque = NULL,
269  .xf_offset = offsetof(struct m0_fi_value, fi_buf),
270  .xf_read = NULL,
271  .xf_decor = {
273  }
274  };
275  m0_xc_u8_init();
276 
278 }
279 
281 {
282  _m0_stob_io_write._child[0] = (struct m0_xcode_field) {
283  .xf_name = "fiw_object",
284 
285  .xf_type = stob_io_fop_fid_xc,
286 
287  .xf_tag = 0,
288  .xf_opaque = NULL,
289  .xf_offset = offsetof(struct m0_stob_io_write, fiw_object),
290  .xf_read = NULL,
291  .xf_decor = {
293  }
294  };
296 
297  _m0_stob_io_write._child[1] = (struct m0_xcode_field) {
298  .xf_name = "fiw_value",
299 
300  .xf_type = m0_fi_value_xc,
301 
302  .xf_tag = 0,
303  .xf_opaque = NULL,
304  .xf_offset = offsetof(struct m0_stob_io_write, fiw_value),
305  .xf_read = NULL,
306  .xf_decor = {
308  }
309  };
311 
313 }
314 
316 {
318  .xf_name = "fiwr_rc",
319 
320  .xf_type = &M0_XT_U32,
321 
322  .xf_tag = 0,
323  .xf_opaque = NULL,
324  .xf_offset = offsetof(struct m0_stob_io_write_rep, fiwr_rc),
325  .xf_read = NULL,
326  .xf_decor = {
328  }
329  };
330  m0_xc_u32_init();
331 
333  .xf_name = "fiwr_count",
334 
335  .xf_type = &M0_XT_U32,
336 
337  .xf_tag = 0,
338  .xf_opaque = NULL,
339  .xf_offset = offsetof(struct m0_stob_io_write_rep, fiwr_count),
340  .xf_read = NULL,
341  .xf_decor = {
343  }
344  };
345  m0_xc_u32_init();
346 
348 }
349 
350 M0_INTERNAL void m0_xc_m0_stob_io_read_struct_init(void)
351 {
352  _m0_stob_io_read._child[0] = (struct m0_xcode_field) {
353  .xf_name = "fir_object",
354 
355  .xf_type = stob_io_fop_fid_xc,
356 
357  .xf_tag = 0,
358  .xf_opaque = NULL,
359  .xf_offset = offsetof(struct m0_stob_io_read, fir_object),
360  .xf_read = NULL,
361  .xf_decor = {
363  }
364  };
366 
368 }
369 
371 {
373  .xf_name = "firr_rc",
374 
375  .xf_type = &M0_XT_U32,
376 
377  .xf_tag = 0,
378  .xf_opaque = NULL,
379  .xf_offset = offsetof(struct m0_stob_io_read_rep, firr_rc),
380  .xf_read = NULL,
381  .xf_decor = {
383  }
384  };
385  m0_xc_u32_init();
386 
388  .xf_name = "firr_count",
389 
390  .xf_type = &M0_XT_U32,
391 
392  .xf_tag = 0,
393  .xf_opaque = NULL,
394  .xf_offset = offsetof(struct m0_stob_io_read_rep, firr_count),
395  .xf_read = NULL,
396  .xf_decor = {
398  }
399  };
400  m0_xc_u32_init();
401 
403  .xf_name = "firr_value",
404 
405  .xf_type = m0_fi_value_xc,
406 
407  .xf_tag = 0,
408  .xf_opaque = NULL,
409  .xf_offset = offsetof(struct m0_stob_io_read_rep, firr_value),
410  .xf_read = NULL,
411  .xf_decor = {
413  }
414  };
416 
418 }
419 
421 {
423  .xf_name = "fic_object",
424 
425  .xf_type = stob_io_fop_fid_xc,
426 
427  .xf_tag = 0,
428  .xf_opaque = NULL,
429  .xf_offset = offsetof(struct m0_stob_io_create, fic_object),
430  .xf_read = NULL,
431  .xf_decor = {
433  }
434  };
436 
438 }
439 
441 {
443  .xf_name = "ficr_rc",
444 
445  .xf_type = &M0_XT_U32,
446 
447  .xf_tag = 0,
448  .xf_opaque = NULL,
449  .xf_offset = offsetof(struct m0_stob_io_create_rep, ficr_rc),
450  .xf_read = NULL,
451  .xf_decor = {
453  }
454  };
455  m0_xc_u32_init();
456 
458 }
459 
460 M0_INTERNAL void m0_xc_reqh_ut_io_fop_init(void)
461 {
470 }
471 
472 M0_INTERNAL void m0_xc_reqh_ut_io_fop_fini(void)
473 {
474 }
M0_BASSERT(offsetof(struct _stob_io_fop_fid_s, _child[0])==offsetof(struct m0_xcode_type, xct_child[0]))
M0_INTERNAL void m0_xc_reqh_ut_io_fop_init(void)
Definition: io_fop_xc.c:460
#define NULL
Definition: misc.h:38
struct m0_xcode_type _type
Definition: io_fop_xc.c:37
static struct _m0_stob_io_create_rep_s _m0_stob_io_create_rep
struct m0_xcode_field _child[3]
Definition: io_fop_xc.c:106
struct m0_xcode_type * m0_stob_io_create_xc
Definition: io_fop_xc.c:16
M0_INTERNAL void m0_xc_m0_stob_io_create_struct_init(void)
Definition: io_fop_xc.c:420
struct m0_xcode_field _child[1]
Definition: io_fop_xc.c:123
static struct _m0_stob_io_write_rep_s _m0_stob_io_write_rep
static struct _m0_stob_io_write_s _m0_stob_io_write
struct m0_xcode_field xct_child[0]
Definition: xcode.h:345
M0_INTERNAL void m0_xc_m0_stob_io_write_struct_init(void)
Definition: io_fop_xc.c:280
struct m0_xcode_type _type
Definition: io_fop_xc.c:71
struct m0_xcode_type _type
Definition: io_fop_xc.c:105
struct m0_xcode_type _type
Definition: io_fop_xc.c:139
struct m0_xcode_type _type
Definition: io_fop_xc.c:122
static struct _m0_fi_value_s _m0_fi_value
static struct _m0_stob_io_read_rep_s _m0_stob_io_read_rep
M0_INTERNAL void m0_xc_reqh_ut_io_fop_fini(void)
Definition: io_fop_xc.c:472
struct m0_xcode_field _child[2]
Definition: io_fop_xc.c:72
M0_INTERNAL void m0_xc_stob_io_fop_fid_struct_init(void)
Definition: io_fop_xc.c:210
struct m0_xcode_type * m0_stob_io_read_rep_xc
Definition: io_fop_xc.c:15
struct m0_xcode_type * m0_stob_io_create_rep_xc
Definition: io_fop_xc.c:17
M0_INTERNAL void m0_xc_m0_stob_io_write_rep_struct_init(void)
Definition: io_fop_xc.c:315
#define M0_POST(cond)
struct m0_xcode_type * m0_stob_io_read_xc
Definition: io_fop_xc.c:14
static struct _stob_io_fop_fid_s _stob_io_fop_fid
struct m0_xcode_type * m0_stob_io_write_xc
Definition: io_fop_xc.c:12
bool m0_xcode_type_invariant(const struct m0_xcode_type *xt)
Definition: xcode.c:74
void m0_xc_u64_init(void)
Definition: xcode.c:904
struct m0_xcode_field _child[2]
Definition: io_fop_xc.c:55
struct m0_xcode_type _type
Definition: io_fop_xc.c:54
const struct m0_xcode_type M0_XT_U32
Definition: xcode.c:932
enum m0_xcode_aggr xct_aggr
Definition: xcode.h:316
static struct _m0_stob_io_create_s _m0_stob_io_create
static struct _m0_stob_io_read_s _m0_stob_io_read
struct m0_xcode_type * stob_io_fop_fid_xc
Definition: io_fop_xc.c:10
const struct m0_xcode_type M0_XT_U8
Definition: xcode.c:924
struct m0_xcode_type * m0_stob_io_write_rep_xc
Definition: io_fop_xc.c:13
void m0_xc_u8_init(void)
Definition: xcode.c:892
void m0_xc_u32_init(void)
Definition: xcode.c:900
struct m0_xcode_type _type
Definition: io_fop_xc.c:20
const char * xf_name
Definition: xcode.h:251
M0_INTERNAL void m0_xc_m0_stob_io_read_rep_struct_init(void)
Definition: io_fop_xc.c:370
struct m0_xcode_field _child[1]
Definition: io_fop_xc.c:140
struct m0_xcode_type _type
Definition: io_fop_xc.c:88
const struct m0_xcode_type M0_XT_U64
Definition: xcode.c:940
struct m0_xcode_field _child[2]
Definition: io_fop_xc.c:21
struct m0_xcode_field _child[1]
Definition: io_fop_xc.c:89
#define offsetof(typ, memb)
Definition: misc.h:29
M0_INTERNAL void m0_xc_m0_stob_io_read_struct_init(void)
Definition: io_fop_xc.c:350
M0_INTERNAL void m0_xc_m0_fi_value_struct_init(void)
Definition: io_fop_xc.c:245
struct m0_xcode_type * m0_fi_value_xc
Definition: io_fop_xc.c:11
struct m0_xcode_field _child[2]
Definition: io_fop_xc.c:38
M0_INTERNAL void m0_xc_m0_stob_io_create_rep_struct_init(void)
Definition: io_fop_xc.c:440