Motr  M0
sns_cp_onwire_xc.c
Go to the documentation of this file.
1 /* This file is automatically generated from sns/cm/sns_cp_onwire.h */
2 
3 #include "lib/misc.h" /* offsetof */
4 #include "lib/assert.h"
5 #include "xcode/xcode.h"
6 
7 #include "sns/cm/sns_cp_onwire.h"
9 
12 
13 static struct _m0_sns_cpx_s {
16 } _m0_sns_cpx = {
17  ._type = {
19  .xct_name = "m0_sns_cpx",
20  .xct_sizeof = sizeof (struct m0_sns_cpx),
21  .xct_nr = 5,
22  .xct_flags = M0_XCODE_TYPE_FLAG_DOM_RPC,
23  }
24 };
25 
27 M0_BASSERT(offsetof(struct _m0_sns_cpx_s, _child[0]) ==
28  offsetof(struct m0_xcode_type, xct_child[0]));
29 
30 static struct _m0_sns_cpx_reply_s {
34  ._type = {
36  .xct_name = "m0_sns_cpx_reply",
37  .xct_sizeof = sizeof (struct m0_sns_cpx_reply),
38  .xct_nr = 2,
39  .xct_flags = M0_XCODE_TYPE_FLAG_DOM_RPC,
40  }
41 };
42 
44 M0_BASSERT(offsetof(struct _m0_sns_cpx_reply_s, _child[0]) ==
45  offsetof(struct m0_xcode_type, xct_child[0]));
46 
47 
48 M0_BASSERT(sizeof(struct m0_sns_cpx) == 152U);
49 
50 M0_BASSERT(sizeof ((struct m0_sns_cpx *)0)->scx_cp == 88U);
51 M0_BASSERT(offsetof(struct m0_sns_cpx, scx_cp) == 0U);
52 M0_BASSERT(sizeof ((struct m0_sns_cpx *)0)->scx_ivecs == 16U);
53 M0_BASSERT(offsetof(struct m0_sns_cpx, scx_ivecs) == 88U);
54 M0_BASSERT(sizeof ((struct m0_sns_cpx *)0)->scx_stob_id == 32U);
55 M0_BASSERT(offsetof(struct m0_sns_cpx, scx_stob_id) == 104U);
56 M0_BASSERT(sizeof ((struct m0_sns_cpx *)0)->scx_failed_idx == 8U);
58 M0_BASSERT(sizeof ((struct m0_sns_cpx *)0)->scx_phase == 4U);
59 M0_BASSERT(offsetof(struct m0_sns_cpx, scx_phase) == 144U);
60 
61 M0_BASSERT(sizeof(struct m0_sns_cpx_reply) == 8U);
62 
63 M0_BASSERT(sizeof ((struct m0_sns_cpx_reply *)0)->scr_rc == 4U);
65 M0_BASSERT(sizeof ((struct m0_sns_cpx_reply *)0)->scr_cp_rep == 4U);
67 
68 
69 
70 M0_INTERNAL void m0_xc_m0_sns_cpx_struct_init(void)
71 {
72  _m0_sns_cpx._child[0] = (struct m0_xcode_field) {
73  .xf_name = "scx_cp",
74 
75  .xf_type = m0_cpx_xc,
76 
77  .xf_tag = 0,
78  .xf_opaque = NULL,
79  .xf_offset = offsetof(struct m0_sns_cpx, scx_cp),
80  .xf_read = NULL,
81  .xf_decor = {
83  }
84  };
86 
87  _m0_sns_cpx._child[1] = (struct m0_xcode_field) {
88  .xf_name = "scx_ivecs",
89 
90  .xf_type = m0_io_indexvec_seq_xc,
91 
92  .xf_tag = 0,
93  .xf_opaque = NULL,
94  .xf_offset = offsetof(struct m0_sns_cpx, scx_ivecs),
95  .xf_read = NULL,
96  .xf_decor = {
98  }
99  };
101 
102  _m0_sns_cpx._child[2] = (struct m0_xcode_field) {
103  .xf_name = "scx_stob_id",
104 
105  .xf_type = m0_stob_id_xc,
106 
107  .xf_tag = 0,
108  .xf_opaque = NULL,
109  .xf_offset = offsetof(struct m0_sns_cpx, scx_stob_id),
110  .xf_read = NULL,
111  .xf_decor = {
113  }
114  };
116 
117  _m0_sns_cpx._child[3] = (struct m0_xcode_field) {
118  .xf_name = "scx_failed_idx",
119 
120  .xf_type = &M0_XT_U64,
121 
122  .xf_tag = 0,
123  .xf_opaque = NULL,
124  .xf_offset = offsetof(struct m0_sns_cpx, scx_failed_idx),
125  .xf_read = NULL,
126  .xf_decor = {
128  }
129  };
130  m0_xc_u64_init();
131 
132  _m0_sns_cpx._child[4] = (struct m0_xcode_field) {
133  .xf_name = "scx_phase",
134 
135  .xf_type = &M0_XT_U32,
136 
137  .xf_tag = 0,
138  .xf_opaque = NULL,
139  .xf_offset = offsetof(struct m0_sns_cpx, scx_phase),
140  .xf_read = NULL,
141  .xf_decor = {
143  }
144  };
145  m0_xc_u32_init();
146 
148 }
149 
151 {
152  _m0_sns_cpx_reply._child[0] = (struct m0_xcode_field) {
153  .xf_name = "scr_rc",
154 
155  .xf_type = &M0_XT_U32,
156 
157  .xf_tag = 0,
158  .xf_opaque = NULL,
159  .xf_offset = offsetof(struct m0_sns_cpx_reply, scr_rc),
160  .xf_read = NULL,
161  .xf_decor = {
163  }
164  };
165  m0_xc_u32_init();
166 
167  _m0_sns_cpx_reply._child[1] = (struct m0_xcode_field) {
168  .xf_name = "scr_cp_rep",
169 
170  .xf_type = m0_cpx_reply_xc,
171 
172  .xf_tag = 0,
173  .xf_opaque = NULL,
174  .xf_offset = offsetof(struct m0_sns_cpx_reply, scr_cp_rep),
175  .xf_read = NULL,
176  .xf_decor = {
178  }
179  };
181 
183 }
184 
185 M0_INTERNAL void m0_xc_sns_cm_sns_cp_onwire_init(void)
186 {
189 }
190 
191 M0_INTERNAL void m0_xc_sns_cm_sns_cp_onwire_fini(void)
192 {
193 }
int32_t scr_rc
Definition: sns_cp_onwire.h:47
struct m0_xcode_type _type
#define NULL
Definition: misc.h:38
struct m0_xcode_type * m0_cpx_xc
Definition: cp_onwire_xc.c:10
struct m0_xcode_field _child[2]
M0_INTERNAL void m0_xc_sns_cm_sns_cp_onwire_init(void)
M0_INTERNAL void m0_xc_m0_stob_id_struct_init(void)
Definition: stob_xc.c:39
struct m0_xcode_type * m0_io_indexvec_seq_xc
Definition: vec_xc.c:13
struct m0_xcode_type * m0_cpx_reply_xc
Definition: cp_onwire_xc.c:11
struct m0_xcode_field xct_child[0]
Definition: xcode.h:345
struct m0_xcode_type * m0_stob_id_xc
Definition: stob_xc.c:10
M0_INTERNAL void m0_xc_m0_sns_cpx_reply_struct_init(void)
M0_INTERNAL void m0_xc_m0_cpx_reply_struct_init(void)
Definition: cp_onwire_xc.c:165
M0_INTERNAL void m0_xc_sns_cm_sns_cp_onwire_fini(void)
M0_INTERNAL void m0_xc_m0_io_indexvec_seq_struct_init(void)
Definition: vec_xc.c:219
struct m0_io_indexvec_seq scx_ivecs
Definition: sns_cp_onwire.h:53
static struct _m0_sns_cpx_s _m0_sns_cpx
struct m0_stob_id scx_stob_id
Definition: sns_cp_onwire.h:56
M0_INTERNAL void m0_xc_m0_cpx_struct_init(void)
Definition: cp_onwire_xc.c:70
struct m0_cpx scx_cp
Definition: sns_cp_onwire.h:48
static struct _m0_sns_cpx_reply_s _m0_sns_cpx_reply
uint32_t scx_phase
Definition: sns_cp_onwire.h:61
#define M0_POST(cond)
bool m0_xcode_type_invariant(const struct m0_xcode_type *xt)
Definition: xcode.c:74
uint64_t scx_failed_idx
Definition: sns_cp_onwire.h:58
void m0_xc_u64_init(void)
Definition: xcode.c:904
M0_INTERNAL void m0_xc_m0_sns_cpx_struct_init(void)
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_field _child[5]
struct m0_xcode_type _type
void m0_xc_u32_init(void)
Definition: xcode.c:900
struct m0_xcode_type * m0_sns_cpx_xc
struct m0_xcode_type * m0_sns_cpx_reply_xc
const char * xf_name
Definition: xcode.h:251
struct m0_cpx_reply scr_cp_rep
Definition: sns_cp_onwire.h:49
M0_BASSERT(offsetof(struct _m0_sns_cpx_s, _child[0])==offsetof(struct m0_xcode_type, xct_child[0]))
const struct m0_xcode_type M0_XT_U64
Definition: xcode.c:940
#define offsetof(typ, memb)
Definition: misc.h:29