Motr  M0
libdemo_xc.c
Go to the documentation of this file.
1 /* This file is automatically generated from iscservice/demo/libdemo.h */
2 
3 #include "lib/misc.h" /* offsetof */
4 #include "lib/assert.h"
5 #include "xcode/xcode.h"
6 
9 
12 
13 static struct _mm_result_s {
16 } _mm_result = {
17  ._type = {
19  .xct_name = "mm_result",
20  .xct_sizeof = sizeof (struct mm_result),
21  .xct_nr = 5,
22  .xct_flags = 0,
23  }
24 };
25 
27 M0_BASSERT(offsetof(struct _mm_result_s, _child[0]) ==
28  offsetof(struct m0_xcode_type, xct_child[0]));
29 
30 static struct _isc_targs_s {
33 } _isc_targs = {
34  ._type = {
36  .xct_name = "isc_targs",
37  .xct_sizeof = sizeof (struct isc_targs),
38  .xct_nr = 2,
39  .xct_flags = 0,
40  }
41 };
42 
44 M0_BASSERT(offsetof(struct _isc_targs_s, _child[0]) ==
45  offsetof(struct m0_xcode_type, xct_child[0]));
46 
47 
48 M0_BASSERT(sizeof(struct mm_result) == 56U);
49 
50 M0_BASSERT(sizeof ((struct mm_result *)0)->mr_idx == 8U);
51 M0_BASSERT(offsetof(struct mm_result, mr_idx) == 0U);
52 M0_BASSERT(sizeof ((struct mm_result *)0)->mr_nr == 8U);
53 M0_BASSERT(offsetof(struct mm_result, mr_nr) == 8U);
54 M0_BASSERT(sizeof ((struct mm_result *)0)->mr_val == 8U);
55 M0_BASSERT(offsetof(struct mm_result, mr_val) == 16U);
56 M0_BASSERT(sizeof ((struct mm_result *)0)->mr_lbuf == 16U);
57 M0_BASSERT(offsetof(struct mm_result, mr_lbuf) == 24U);
58 M0_BASSERT(sizeof ((struct mm_result *)0)->mr_rbuf == 16U);
59 M0_BASSERT(offsetof(struct mm_result, mr_rbuf) == 40U);
60 
61 M0_BASSERT(sizeof(struct isc_targs) == 32U);
62 
63 M0_BASSERT(sizeof ((struct isc_targs *)0)->ist_cob == 16U);
64 M0_BASSERT(offsetof(struct isc_targs, ist_cob) == 0U);
65 M0_BASSERT(sizeof ((struct isc_targs *)0)->ist_ioiv == 16U);
66 M0_BASSERT(offsetof(struct isc_targs, ist_ioiv) == 16U);
67 
68 
69 
70 M0_INTERNAL void m0_xc_mm_result_struct_init(void)
71 {
72  _mm_result._child[0] = (struct m0_xcode_field) {
73  .xf_name = "mr_idx",
74 
75  .xf_type = &M0_XT_U64,
76 
77  .xf_tag = 0,
78  .xf_opaque = NULL,
79  .xf_offset = offsetof(struct mm_result, mr_idx),
80  .xf_read = NULL,
81  .xf_decor = {
83  }
84  };
86 
87  _mm_result._child[1] = (struct m0_xcode_field) {
88  .xf_name = "mr_nr",
89 
90  .xf_type = &M0_XT_U64,
91 
92  .xf_tag = 0,
93  .xf_opaque = NULL,
94  .xf_offset = offsetof(struct mm_result, mr_nr),
95  .xf_read = NULL,
96  .xf_decor = {
98  }
99  };
100  m0_xc_u64_init();
101 
102  _mm_result._child[2] = (struct m0_xcode_field) {
103  .xf_name = "mr_val",
104 
105  .xf_type = &M0_XT_U64,
106 
107  .xf_tag = 0,
108  .xf_opaque = NULL,
109  .xf_offset = offsetof(struct mm_result, mr_val),
110  .xf_read = NULL,
111  .xf_decor = {
113  }
114  };
115  m0_xc_u64_init();
116 
117  _mm_result._child[3] = (struct m0_xcode_field) {
118  .xf_name = "mr_lbuf",
119 
120  .xf_type = m0_buf_xc,
121 
122  .xf_tag = 0,
123  .xf_opaque = NULL,
124  .xf_offset = offsetof(struct mm_result, mr_lbuf),
125  .xf_read = NULL,
126  .xf_decor = {
128  }
129  };
131 
132  _mm_result._child[4] = (struct m0_xcode_field) {
133  .xf_name = "mr_rbuf",
134 
135  .xf_type = m0_buf_xc,
136 
137  .xf_tag = 0,
138  .xf_opaque = NULL,
139  .xf_offset = offsetof(struct mm_result, mr_rbuf),
140  .xf_read = NULL,
141  .xf_decor = {
143  }
144  };
146 
148 }
149 
150 M0_INTERNAL void m0_xc_isc_targs_struct_init(void)
151 {
152  _isc_targs._child[0] = (struct m0_xcode_field) {
153  .xf_name = "ist_cob",
154 
155  .xf_type = m0_fid_xc,
156 
157  .xf_tag = 0,
158  .xf_opaque = NULL,
159  .xf_offset = offsetof(struct isc_targs, ist_cob),
160  .xf_read = NULL,
161  .xf_decor = {
163  }
164  };
166 
167  _isc_targs._child[1] = (struct m0_xcode_field) {
168  .xf_name = "ist_ioiv",
169 
170  .xf_type = m0_io_indexvec_xc,
171 
172  .xf_tag = 0,
173  .xf_opaque = NULL,
174  .xf_offset = offsetof(struct isc_targs, ist_ioiv),
175  .xf_read = NULL,
176  .xf_decor = {
178  }
179  };
181 
183 }
184 
186 {
189 }
190 
192 {
193 }
static struct _isc_targs_s _isc_targs
struct m0_xcode_type * m0_buf_xc
Definition: buf_xc.c:10
struct m0_xcode_field _child[5]
Definition: libdemo_xc.c:15
M0_INTERNAL void m0_xc_isc_targs_struct_init(void)
Definition: libdemo_xc.c:150
#define NULL
Definition: misc.h:38
M0_INTERNAL void m0_xc_m0_io_indexvec_struct_init(void)
Definition: vec_xc.c:184
struct m0_xcode_field xct_child[0]
Definition: xcode.h:345
M0_INTERNAL void m0_xc_m0_fid_struct_init(void)
Definition: fid_xc.c:64
static struct _mm_result_s _mm_result
M0_INTERNAL void m0_xc_m0_buf_struct_init(void)
Definition: buf_xc.c:64
struct m0_xcode_type * mm_result_xc
Definition: libdemo_xc.c:10
M0_BASSERT(offsetof(struct _mm_result_s, _child[0])==offsetof(struct m0_xcode_type, xct_child[0]))
#define M0_POST(cond)
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: libdemo_xc.c:32
enum m0_xcode_aggr xct_aggr
Definition: xcode.h:316
M0_INTERNAL void m0_xc_mm_result_struct_init(void)
Definition: libdemo_xc.c:70
struct m0_xcode_type _type
Definition: libdemo_xc.c:31
struct m0_xcode_type _type
Definition: libdemo_xc.c:14
M0_INTERNAL void m0_xc_iscservice_demo_libdemo_fini(void)
Definition: libdemo_xc.c:191
struct m0_xcode_type * m0_io_indexvec_xc
Definition: vec_xc.c:12
const char * xf_name
Definition: xcode.h:251
M0_INTERNAL void m0_xc_iscservice_demo_libdemo_init(void)
Definition: libdemo_xc.c:185
struct m0_xcode_type * m0_fid_xc
Definition: fid_xc.c:10
const struct m0_xcode_type M0_XT_U64
Definition: xcode.c:940
#define offsetof(typ, memb)
Definition: misc.h:29
struct m0_xcode_type * isc_targs_xc
Definition: libdemo_xc.c:11