Motr  M0
link_fops_xc.c
Go to the documentation of this file.
1 /* This file is automatically generated from ha/link_fops.h */
2 
3 #include "lib/misc.h" /* offsetof */
4 #include "lib/assert.h"
5 #include "xcode/xcode.h"
6 
7 #include "ha/link_fops.h"
8 #include "ha/link_fops_xc.h"
9 
14 
15 static struct _m0_ha_link_tags_s {
18 } _m0_ha_link_tags = {
19  ._type = {
21  .xct_name = "m0_ha_link_tags",
22  .xct_sizeof = sizeof (struct m0_ha_link_tags),
23  .xct_nr = 4,
24  .xct_flags = M0_XCODE_TYPE_FLAG_DOM_RPC,
25  }
26 };
27 
29 M0_BASSERT(offsetof(struct _m0_ha_link_tags_s, _child[0]) ==
30  offsetof(struct m0_xcode_type, xct_child[0]));
31 
32 static struct _m0_ha_link_msg_fop_s {
36  ._type = {
38  .xct_name = "m0_ha_link_msg_fop",
39  .xct_sizeof = sizeof (struct m0_ha_link_msg_fop),
40  .xct_nr = 8,
41  .xct_flags = M0_XCODE_TYPE_FLAG_DOM_RPC,
42  }
43 };
44 
46 M0_BASSERT(offsetof(struct _m0_ha_link_msg_fop_s, _child[0]) ==
47  offsetof(struct m0_xcode_type, xct_child[0]));
48 
53  ._type = {
55  .xct_name = "m0_ha_link_msg_rep_fop",
56  .xct_sizeof = sizeof (struct m0_ha_link_msg_rep_fop),
57  .xct_nr = 3,
58  .xct_flags = M0_XCODE_TYPE_FLAG_DOM_RPC,
59  }
60 };
61 
63 M0_BASSERT(offsetof(struct _m0_ha_link_msg_rep_fop_s, _child[0]) ==
64  offsetof(struct m0_xcode_type, xct_child[0]));
65 
66 static struct _m0_ha_link_params_s {
70  ._type = {
72  .xct_name = "m0_ha_link_params",
73  .xct_sizeof = sizeof (struct m0_ha_link_params),
74  .xct_nr = 5,
75  .xct_flags = M0_XCODE_TYPE_FLAG_DOM_RPC,
76  }
77 };
78 
80 M0_BASSERT(offsetof(struct _m0_ha_link_params_s, _child[0]) ==
81  offsetof(struct m0_xcode_type, xct_child[0]));
82 
83 
84 M0_BASSERT(sizeof(struct m0_ha_link_tags) == 32U);
85 
86 M0_BASSERT(sizeof ((struct m0_ha_link_tags *)0)->hlt_confirmed == 8U);
88 M0_BASSERT(sizeof ((struct m0_ha_link_tags *)0)->hlt_delivered == 8U);
90 M0_BASSERT(sizeof ((struct m0_ha_link_tags *)0)->hlt_next == 8U);
92 M0_BASSERT(sizeof ((struct m0_ha_link_tags *)0)->hlt_assign == 8U);
94 
95 M0_BASSERT(sizeof(struct m0_ha_link_msg_fop) == 24776U);
96 
97 M0_BASSERT(sizeof ((struct m0_ha_link_msg_fop *)0)->lmf_msg_nr == 8U);
99 M0_BASSERT(sizeof ((struct m0_ha_link_msg_fop *)0)->lmf_msg == 24696U);
101 M0_BASSERT(sizeof ((struct m0_ha_link_msg_fop *)0)->lmf_id_local == 16U);
103 M0_BASSERT(sizeof ((struct m0_ha_link_msg_fop *)0)->lmf_id_remote == 16U);
105 M0_BASSERT(sizeof ((struct m0_ha_link_msg_fop *)0)->lmf_id_connection == 16U);
107 M0_BASSERT(sizeof ((struct m0_ha_link_msg_fop *)0)->lmf_out_next == 8U);
109 M0_BASSERT(sizeof ((struct m0_ha_link_msg_fop *)0)->lmf_in_delivered == 8U);
111 M0_BASSERT(sizeof ((struct m0_ha_link_msg_fop *)0)->lmf_seq == 8U);
112 M0_BASSERT(offsetof(struct m0_ha_link_msg_fop, lmf_seq) == 24768U);
113 
114 M0_BASSERT(sizeof(struct m0_ha_link_msg_rep_fop) == 24U);
115 
116 M0_BASSERT(sizeof ((struct m0_ha_link_msg_rep_fop *)0)->lmr_rc == 4U);
118 M0_BASSERT(sizeof ((struct m0_ha_link_msg_rep_fop *)0)->lmr_out_next == 8U);
120 M0_BASSERT(sizeof ((struct m0_ha_link_msg_rep_fop *)0)->lmr_in_delivered == 8U);
122 
123 M0_BASSERT(sizeof(struct m0_ha_link_params) == 112U);
124 
125 M0_BASSERT(sizeof ((struct m0_ha_link_params *)0)->hlp_id_local == 16U);
127 M0_BASSERT(sizeof ((struct m0_ha_link_params *)0)->hlp_id_remote == 16U);
129 M0_BASSERT(sizeof ((struct m0_ha_link_params *)0)->hlp_id_connection == 16U);
131 M0_BASSERT(sizeof ((struct m0_ha_link_params *)0)->hlp_tags_local == 32U);
133 M0_BASSERT(sizeof ((struct m0_ha_link_params *)0)->hlp_tags_remote == 32U);
135 
136 
137 
138 M0_INTERNAL void m0_xc_m0_ha_link_tags_struct_init(void)
139 {
140  _m0_ha_link_tags._child[0] = (struct m0_xcode_field) {
141  .xf_name = "hlt_confirmed",
142 
143  .xf_type = &M0_XT_U64,
144 
145  .xf_tag = 0,
146  .xf_opaque = NULL,
147  .xf_offset = offsetof(struct m0_ha_link_tags, hlt_confirmed),
148  .xf_read = NULL,
149  .xf_decor = {
151  }
152  };
153  m0_xc_u64_init();
154 
155  _m0_ha_link_tags._child[1] = (struct m0_xcode_field) {
156  .xf_name = "hlt_delivered",
157 
158  .xf_type = &M0_XT_U64,
159 
160  .xf_tag = 0,
161  .xf_opaque = NULL,
162  .xf_offset = offsetof(struct m0_ha_link_tags, hlt_delivered),
163  .xf_read = NULL,
164  .xf_decor = {
166  }
167  };
168  m0_xc_u64_init();
169 
170  _m0_ha_link_tags._child[2] = (struct m0_xcode_field) {
171  .xf_name = "hlt_next",
172 
173  .xf_type = &M0_XT_U64,
174 
175  .xf_tag = 0,
176  .xf_opaque = NULL,
177  .xf_offset = offsetof(struct m0_ha_link_tags, hlt_next),
178  .xf_read = NULL,
179  .xf_decor = {
181  }
182  };
183  m0_xc_u64_init();
184 
185  _m0_ha_link_tags._child[3] = (struct m0_xcode_field) {
186  .xf_name = "hlt_assign",
187 
188  .xf_type = &M0_XT_U64,
189 
190  .xf_tag = 0,
191  .xf_opaque = NULL,
192  .xf_offset = offsetof(struct m0_ha_link_tags, hlt_assign),
193  .xf_read = NULL,
194  .xf_decor = {
196  }
197  };
198  m0_xc_u64_init();
199 
201 }
202 
204 {
206  .xf_name = "lmf_msg_nr",
207 
208  .xf_type = &M0_XT_U64,
209 
210  .xf_tag = 0,
211  .xf_opaque = NULL,
212  .xf_offset = offsetof(struct m0_ha_link_msg_fop, lmf_msg_nr),
213  .xf_read = NULL,
214  .xf_decor = {
216  }
217  };
218  m0_xc_u64_init();
219 
221  .xf_name = "lmf_msg",
222 
223  .xf_type = m0_ha_msg_xc,
224 
225  .xf_tag = 0,
226  .xf_opaque = NULL,
227  .xf_offset = offsetof(struct m0_ha_link_msg_fop, lmf_msg),
228  .xf_read = NULL,
229  .xf_decor = {
231  }
232  };
234 
236  .xf_name = "lmf_id_local",
237 
238  .xf_type = m0_uint128_xc,
239 
240  .xf_tag = 0,
241  .xf_opaque = NULL,
242  .xf_offset = offsetof(struct m0_ha_link_msg_fop, lmf_id_local),
243  .xf_read = NULL,
244  .xf_decor = {
246  }
247  };
249 
251  .xf_name = "lmf_id_remote",
252 
253  .xf_type = m0_uint128_xc,
254 
255  .xf_tag = 0,
256  .xf_opaque = NULL,
257  .xf_offset = offsetof(struct m0_ha_link_msg_fop, lmf_id_remote),
258  .xf_read = NULL,
259  .xf_decor = {
261  }
262  };
264 
266  .xf_name = "lmf_id_connection",
267 
268  .xf_type = m0_uint128_xc,
269 
270  .xf_tag = 0,
271  .xf_opaque = NULL,
272  .xf_offset = offsetof(struct m0_ha_link_msg_fop, lmf_id_connection),
273  .xf_read = NULL,
274  .xf_decor = {
276  }
277  };
279 
281  .xf_name = "lmf_out_next",
282 
283  .xf_type = &M0_XT_U64,
284 
285  .xf_tag = 0,
286  .xf_opaque = NULL,
287  .xf_offset = offsetof(struct m0_ha_link_msg_fop, lmf_out_next),
288  .xf_read = NULL,
289  .xf_decor = {
291  }
292  };
293  m0_xc_u64_init();
294 
296  .xf_name = "lmf_in_delivered",
297 
298  .xf_type = &M0_XT_U64,
299 
300  .xf_tag = 0,
301  .xf_opaque = NULL,
302  .xf_offset = offsetof(struct m0_ha_link_msg_fop, lmf_in_delivered),
303  .xf_read = NULL,
304  .xf_decor = {
306  }
307  };
308  m0_xc_u64_init();
309 
311  .xf_name = "lmf_seq",
312 
313  .xf_type = &M0_XT_U64,
314 
315  .xf_tag = 0,
316  .xf_opaque = NULL,
317  .xf_offset = offsetof(struct m0_ha_link_msg_fop, lmf_seq),
318  .xf_read = NULL,
319  .xf_decor = {
321  }
322  };
323  m0_xc_u64_init();
324 
326 }
327 
329 {
331  .xf_name = "lmr_rc",
332 
333  .xf_type = &M0_XT_U32,
334 
335  .xf_tag = 0,
336  .xf_opaque = NULL,
337  .xf_offset = offsetof(struct m0_ha_link_msg_rep_fop, lmr_rc),
338  .xf_read = NULL,
339  .xf_decor = {
341  }
342  };
343  m0_xc_u32_init();
344 
346  .xf_name = "lmr_out_next",
347 
348  .xf_type = &M0_XT_U64,
349 
350  .xf_tag = 0,
351  .xf_opaque = NULL,
352  .xf_offset = offsetof(struct m0_ha_link_msg_rep_fop, lmr_out_next),
353  .xf_read = NULL,
354  .xf_decor = {
356  }
357  };
358  m0_xc_u64_init();
359 
361  .xf_name = "lmr_in_delivered",
362 
363  .xf_type = &M0_XT_U64,
364 
365  .xf_tag = 0,
366  .xf_opaque = NULL,
367  .xf_offset = offsetof(struct m0_ha_link_msg_rep_fop, lmr_in_delivered),
368  .xf_read = NULL,
369  .xf_decor = {
371  }
372  };
373  m0_xc_u64_init();
374 
376 }
377 
379 {
381  .xf_name = "hlp_id_local",
382 
383  .xf_type = m0_uint128_xc,
384 
385  .xf_tag = 0,
386  .xf_opaque = NULL,
387  .xf_offset = offsetof(struct m0_ha_link_params, hlp_id_local),
388  .xf_read = NULL,
389  .xf_decor = {
391  }
392  };
394 
396  .xf_name = "hlp_id_remote",
397 
398  .xf_type = m0_uint128_xc,
399 
400  .xf_tag = 0,
401  .xf_opaque = NULL,
402  .xf_offset = offsetof(struct m0_ha_link_params, hlp_id_remote),
403  .xf_read = NULL,
404  .xf_decor = {
406  }
407  };
409 
411  .xf_name = "hlp_id_connection",
412 
413  .xf_type = m0_uint128_xc,
414 
415  .xf_tag = 0,
416  .xf_opaque = NULL,
417  .xf_offset = offsetof(struct m0_ha_link_params, hlp_id_connection),
418  .xf_read = NULL,
419  .xf_decor = {
421  }
422  };
424 
426  .xf_name = "hlp_tags_local",
427 
428  .xf_type = m0_ha_link_tags_xc,
429 
430  .xf_tag = 0,
431  .xf_opaque = NULL,
432  .xf_offset = offsetof(struct m0_ha_link_params, hlp_tags_local),
433  .xf_read = NULL,
434  .xf_decor = {
436  }
437  };
439 
441  .xf_name = "hlp_tags_remote",
442 
443  .xf_type = m0_ha_link_tags_xc,
444 
445  .xf_tag = 0,
446  .xf_opaque = NULL,
447  .xf_offset = offsetof(struct m0_ha_link_params, hlp_tags_remote),
448  .xf_read = NULL,
449  .xf_decor = {
451  }
452  };
454 
456 }
457 
458 M0_INTERNAL void m0_xc_ha_link_fops_init(void)
459 {
464 }
465 
466 M0_INTERNAL void m0_xc_ha_link_fops_fini(void)
467 {
468 }
#define NULL
Definition: misc.h:38
struct m0_xcode_type * m0_uint128_xc
Definition: types_xc.c:10
struct m0_xcode_field xct_child[0]
Definition: xcode.h:345
M0_INTERNAL void m0_xc_m0_ha_msg_struct_init(void)
Definition: msg_xc.c:94
M0_INTERNAL void m0_xc_m0_uint128_struct_init(void)
Definition: types_xc.c:39
#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
const struct m0_xcode_type M0_XT_U32
Definition: xcode.c:932
enum m0_xcode_aggr xct_aggr
Definition: xcode.h:316
struct m0_xcode_type * m0_ha_msg_xc
Definition: msg_xc.c:10
void m0_xc_u32_init(void)
Definition: xcode.c:900
const char * xf_name
Definition: xcode.h:251
const struct m0_xcode_type M0_XT_U64
Definition: xcode.c:940
#define offsetof(typ, memb)
Definition: misc.h:29