Motr  M0
vec_xc.c
Go to the documentation of this file.
1 /* This file is automatically generated from lib/vec.h */
2 
3 #include "lib/misc.h" /* offsetof */
4 #include "lib/assert.h"
5 #include "xcode/xcode.h"
6 
7 #include "lib/vec.h"
8 #include "lib/vec_xc.h"
9 
14 
15 static struct _m0_vec_s {
18 } _m0_vec = {
19  ._type = {
21  .xct_name = "m0_vec",
22  .xct_sizeof = sizeof (struct m0_vec),
23  .xct_nr = 2,
24  .xct_flags = M0_XCODE_TYPE_FLAG_DOM_RPC,
25  }
26 };
27 
29 M0_BASSERT(offsetof(struct _m0_vec_s, _child[0]) ==
30  offsetof(struct m0_xcode_type, xct_child[0]));
31 
32 static struct _m0_ioseg_s {
35 } _m0_ioseg = {
36  ._type = {
38  .xct_name = "m0_ioseg",
39  .xct_sizeof = sizeof (struct m0_ioseg),
40  .xct_nr = 2,
41  .xct_flags = M0_XCODE_TYPE_FLAG_DOM_RPC,
42  }
43 };
44 
46 M0_BASSERT(offsetof(struct _m0_ioseg_s, _child[0]) ==
47  offsetof(struct m0_xcode_type, xct_child[0]));
48 
49 static struct _m0_io_indexvec_s {
52 } _m0_io_indexvec = {
53  ._type = {
55  .xct_name = "m0_io_indexvec",
56  .xct_sizeof = sizeof (struct m0_io_indexvec),
57  .xct_nr = 2,
58  .xct_flags = M0_XCODE_TYPE_FLAG_DOM_RPC,
59  }
60 };
61 
63 M0_BASSERT(offsetof(struct _m0_io_indexvec_s, _child[0]) ==
64  offsetof(struct m0_xcode_type, xct_child[0]));
65 
66 static struct _m0_io_indexvec_seq_s {
70  ._type = {
72  .xct_name = "m0_io_indexvec_seq",
73  .xct_sizeof = sizeof (struct m0_io_indexvec_seq),
74  .xct_nr = 2,
75  .xct_flags = M0_XCODE_TYPE_FLAG_DOM_RPC,
76  }
77 };
78 
80 M0_BASSERT(offsetof(struct _m0_io_indexvec_seq_s, _child[0]) ==
81  offsetof(struct m0_xcode_type, xct_child[0]));
82 
83 
84 M0_BASSERT(sizeof(struct m0_vec) == 16U);
85 
86 M0_BASSERT(sizeof ((struct m0_vec *)0)->v_nr == 4U);
87 M0_BASSERT(offsetof(struct m0_vec, v_nr) == 0U);
88 M0_BASSERT(sizeof ((struct m0_vec *)0)->v_count == 8U);
89 M0_BASSERT(offsetof(struct m0_vec, v_count) == 8U);
90 
91 M0_BASSERT(sizeof(struct m0_ioseg) == 16U);
92 
93 M0_BASSERT(sizeof ((struct m0_ioseg *)0)->ci_index == 8U);
94 M0_BASSERT(offsetof(struct m0_ioseg, ci_index) == 0U);
95 M0_BASSERT(sizeof ((struct m0_ioseg *)0)->ci_count == 8U);
96 M0_BASSERT(offsetof(struct m0_ioseg, ci_count) == 8U);
97 
98 M0_BASSERT(sizeof(struct m0_io_indexvec) == 16U);
99 
100 M0_BASSERT(sizeof ((struct m0_io_indexvec *)0)->ci_nr == 4U);
101 M0_BASSERT(offsetof(struct m0_io_indexvec, ci_nr) == 0U);
102 M0_BASSERT(sizeof ((struct m0_io_indexvec *)0)->ci_iosegs == 8U);
104 
105 M0_BASSERT(sizeof(struct m0_io_indexvec_seq) == 16U);
106 
107 M0_BASSERT(sizeof ((struct m0_io_indexvec_seq *)0)->cis_nr == 4U);
109 M0_BASSERT(sizeof ((struct m0_io_indexvec_seq *)0)->cis_ivecs == 8U);
111 
112 
113 
114 M0_INTERNAL void m0_xc_m0_vec_struct_init(void)
115 {
116  _m0_vec._child[0] = (struct m0_xcode_field) {
117  .xf_name = "v_nr",
118 
119  .xf_type = &M0_XT_U32,
120 
121  .xf_tag = 0,
122  .xf_opaque = NULL,
123  .xf_offset = offsetof(struct m0_vec, v_nr),
124  .xf_read = NULL,
125  .xf_decor = {
127  }
128  };
129  m0_xc_u32_init();
130 
131  _m0_vec._child[1] = (struct m0_xcode_field) {
132  .xf_name = "v_count",
133 
134  .xf_type = &M0_XT_U64,
135 
136  .xf_tag = 0,
137  .xf_opaque = NULL,
138  .xf_offset = offsetof(struct m0_vec, v_count),
139  .xf_read = NULL,
140  .xf_decor = {
142  }
143  };
144  m0_xc_u64_init();
145 
147 }
148 
149 M0_INTERNAL void m0_xc_m0_ioseg_struct_init(void)
150 {
151  _m0_ioseg._child[0] = (struct m0_xcode_field) {
152  .xf_name = "ci_index",
153 
154  .xf_type = &M0_XT_U64,
155 
156  .xf_tag = 0,
157  .xf_opaque = NULL,
158  .xf_offset = offsetof(struct m0_ioseg, ci_index),
159  .xf_read = NULL,
160  .xf_decor = {
162  }
163  };
164  m0_xc_u64_init();
165 
166  _m0_ioseg._child[1] = (struct m0_xcode_field) {
167  .xf_name = "ci_count",
168 
169  .xf_type = &M0_XT_U64,
170 
171  .xf_tag = 0,
172  .xf_opaque = NULL,
173  .xf_offset = offsetof(struct m0_ioseg, ci_count),
174  .xf_read = NULL,
175  .xf_decor = {
177  }
178  };
179  m0_xc_u64_init();
180 
182 }
183 
184 M0_INTERNAL void m0_xc_m0_io_indexvec_struct_init(void)
185 {
186  _m0_io_indexvec._child[0] = (struct m0_xcode_field) {
187  .xf_name = "ci_nr",
188 
189  .xf_type = &M0_XT_U32,
190 
191  .xf_tag = 0,
192  .xf_opaque = NULL,
193  .xf_offset = offsetof(struct m0_io_indexvec, ci_nr),
194  .xf_read = NULL,
195  .xf_decor = {
197  }
198  };
199  m0_xc_u32_init();
200 
201  _m0_io_indexvec._child[1] = (struct m0_xcode_field) {
202  .xf_name = "ci_iosegs",
203 
204  .xf_type = m0_ioseg_xc,
205 
206  .xf_tag = 0,
207  .xf_opaque = NULL,
208  .xf_offset = offsetof(struct m0_io_indexvec, ci_iosegs),
209  .xf_read = NULL,
210  .xf_decor = {
212  }
213  };
215 
217 }
218 
220 {
222  .xf_name = "cis_nr",
223 
224  .xf_type = &M0_XT_U32,
225 
226  .xf_tag = 0,
227  .xf_opaque = NULL,
228  .xf_offset = offsetof(struct m0_io_indexvec_seq, cis_nr),
229  .xf_read = NULL,
230  .xf_decor = {
232  }
233  };
234  m0_xc_u32_init();
235 
237  .xf_name = "cis_ivecs",
238 
239  .xf_type = m0_io_indexvec_xc,
240 
241  .xf_tag = 0,
242  .xf_opaque = NULL,
243  .xf_offset = offsetof(struct m0_io_indexvec_seq, cis_ivecs),
244  .xf_read = NULL,
245  .xf_decor = {
247  }
248  };
250 
252 }
253 
254 M0_INTERNAL void m0_xc_lib_vec_init(void)
255 {
260 }
261 
262 M0_INTERNAL void m0_xc_lib_vec_fini(void)
263 {
264 }
struct m0_xcode_type * m0_ioseg_xc
Definition: vec_xc.c:11
uint32_t cis_nr
Definition: vec.h:618
#define NULL
Definition: misc.h:38
uint64_t ci_count
Definition: vec.h:619
struct m0_xcode_type _type
Definition: vec_xc.c:50
M0_INTERNAL void m0_xc_m0_ioseg_struct_init(void)
Definition: vec_xc.c:149
uint32_t ci_nr
Definition: vec.h:618
struct m0_xcode_type * m0_io_indexvec_seq_xc
Definition: vec_xc.c:13
static struct _m0_io_indexvec_seq_s _m0_io_indexvec_seq
Definition: vec.h:49
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
static struct _m0_vec_s _m0_vec
struct m0_xcode_type _type
Definition: vec_xc.c:16
uint64_t ci_index
Definition: vec.h:618
Definition: vec.h:625
M0_INTERNAL void m0_xc_m0_io_indexvec_seq_struct_init(void)
Definition: vec_xc.c:219
struct m0_ioseg * ci_iosegs
Definition: vec.h:619
struct m0_xcode_field _child[2]
Definition: vec_xc.c:34
struct m0_xcode_field _child[2]
Definition: vec_xc.c:51
struct m0_xcode_field _child[2]
Definition: vec_xc.c:17
static struct _m0_io_indexvec_s _m0_io_indexvec
struct m0_xcode_type * m0_vec_xc
Definition: vec_xc.c:10
M0_INTERNAL void m0_xc_lib_vec_init(void)
Definition: vec_xc.c:254
#define M0_POST(cond)
struct m0_xcode_type _type
Definition: vec_xc.c:33
bool m0_xcode_type_invariant(const struct m0_xcode_type *xt)
Definition: xcode.c:74
m0_bcount_t * v_count
Definition: vec.h:1319
void m0_xc_u64_init(void)
Definition: xcode.c:904
struct m0_xcode_type _type
Definition: vec_xc.c:67
const struct m0_xcode_type M0_XT_U32
Definition: xcode.c:932
M0_INTERNAL void m0_xc_lib_vec_fini(void)
Definition: vec_xc.c:262
enum m0_xcode_aggr xct_aggr
Definition: xcode.h:316
static struct _m0_ioseg_s _m0_ioseg
uint32_t v_nr
Definition: vec.h:1317
struct m0_io_indexvec * cis_ivecs
Definition: vec.h:619
void m0_xc_u32_init(void)
Definition: xcode.c:900
struct m0_xcode_field _child[2]
Definition: vec_xc.c:68
struct m0_xcode_type * m0_io_indexvec_xc
Definition: vec_xc.c:12
const char * xf_name
Definition: xcode.h:251
const struct m0_xcode_type M0_XT_U64
Definition: xcode.c:940
M0_INTERNAL void m0_xc_m0_vec_struct_init(void)
Definition: vec_xc.c:114
#define offsetof(typ, memb)
Definition: misc.h:29
M0_BASSERT(offsetof(struct _m0_vec_s, _child[0])==offsetof(struct m0_xcode_type, xct_child[0]))