Motr  M0
trigger_fop_xc.c
Go to the documentation of this file.
1 /* This file is automatically generated from cm/repreb/trigger_fop.h */
2 
3 #include "lib/misc.h" /* offsetof */
4 #include "lib/assert.h"
5 #include "xcode/xcode.h"
6 
9 
14 
15 static struct _failure_data_s {
18 } _failure_data = {
19  ._type = {
21  .xct_name = "failure_data",
22  .xct_sizeof = sizeof (struct failure_data),
23  .xct_nr = 2,
24  .xct_flags = M0_XCODE_TYPE_FLAG_DOM_RPC,
25  }
26 };
27 
29 M0_BASSERT(offsetof(struct _failure_data_s, _child[0]) ==
30  offsetof(struct m0_xcode_type, xct_child[0]));
31 
32 static struct _trigger_fop_s {
35 } _trigger_fop = {
36  ._type = {
38  .xct_name = "trigger_fop",
39  .xct_sizeof = sizeof (struct trigger_fop),
40  .xct_nr = 1,
41  .xct_flags = M0_XCODE_TYPE_FLAG_DOM_RPC,
42  }
43 };
44 
46 M0_BASSERT(offsetof(struct _trigger_fop_s, _child[0]) ==
47  offsetof(struct m0_xcode_type, xct_child[0]));
48 
49 static struct _trigger_rep_fop_s {
52 } _trigger_rep_fop = {
53  ._type = {
55  .xct_name = "trigger_rep_fop",
56  .xct_sizeof = sizeof (struct trigger_rep_fop),
57  .xct_nr = 1,
58  .xct_flags = M0_XCODE_TYPE_FLAG_DOM_RPC,
59  }
60 };
61 
63 M0_BASSERT(offsetof(struct _trigger_rep_fop_s, _child[0]) ==
64  offsetof(struct m0_xcode_type, xct_child[0]));
65 
66 static struct _m0_status_rep_fop_s {
70  ._type = {
72  .xct_name = "m0_status_rep_fop",
73  .xct_sizeof = sizeof (struct m0_status_rep_fop),
74  .xct_nr = 3,
75  .xct_flags = M0_XCODE_TYPE_FLAG_DOM_RPC,
76  }
77 };
78 
80 M0_BASSERT(offsetof(struct _m0_status_rep_fop_s, _child[0]) ==
81  offsetof(struct m0_xcode_type, xct_child[0]));
82 
83 
84 M0_BASSERT(sizeof(struct failure_data) == 16U);
85 
86 M0_BASSERT(sizeof ((struct failure_data *)0)->fd_nr == 4U);
87 M0_BASSERT(offsetof(struct failure_data, fd_nr) == 0U);
88 M0_BASSERT(sizeof ((struct failure_data *)0)->fd_index == 8U);
90 
91 M0_BASSERT(sizeof(struct trigger_fop) == 4U);
92 
93 M0_BASSERT(sizeof ((struct trigger_fop *)0)->op == 4U);
94 M0_BASSERT(offsetof(struct trigger_fop, op) == 0U);
95 
96 M0_BASSERT(sizeof(struct trigger_rep_fop) == 4U);
97 
98 M0_BASSERT(sizeof ((struct trigger_rep_fop *)0)->rc == 4U);
99 M0_BASSERT(offsetof(struct trigger_rep_fop, rc) == 0U);
100 
101 M0_BASSERT(sizeof(struct m0_status_rep_fop) == 16U);
102 
103 M0_BASSERT(sizeof ((struct m0_status_rep_fop *)0)->ssr_rc == 4U);
105 M0_BASSERT(sizeof ((struct m0_status_rep_fop *)0)->ssr_state == 4U);
107 M0_BASSERT(sizeof ((struct m0_status_rep_fop *)0)->ssr_progress == 8U);
109 
110 
111 
112 M0_INTERNAL void m0_xc_failure_data_struct_init(void)
113 {
114  _failure_data._child[0] = (struct m0_xcode_field) {
115  .xf_name = "fd_nr",
116 
117  .xf_type = &M0_XT_U32,
118 
119  .xf_tag = 0,
120  .xf_opaque = NULL,
121  .xf_offset = offsetof(struct failure_data, fd_nr),
122  .xf_read = NULL,
123  .xf_decor = {
125  }
126  };
127  m0_xc_u32_init();
128 
129  _failure_data._child[1] = (struct m0_xcode_field) {
130  .xf_name = "fd_index",
131 
132  .xf_type = &M0_XT_U64,
133 
134  .xf_tag = 0,
135  .xf_opaque = NULL,
136  .xf_offset = offsetof(struct failure_data, fd_index),
137  .xf_read = NULL,
138  .xf_decor = {
140  }
141  };
142  m0_xc_u64_init();
143 
145 }
146 
147 M0_INTERNAL void m0_xc_trigger_fop_struct_init(void)
148 {
149  _trigger_fop._child[0] = (struct m0_xcode_field) {
150  .xf_name = "op",
151 
152  .xf_type = &M0_XT_U32,
153 
154  .xf_tag = 0,
155  .xf_opaque = NULL,
156  .xf_offset = offsetof(struct trigger_fop, op),
157  .xf_read = NULL,
158  .xf_decor = {
160  }
161  };
162  m0_xc_u32_init();
163 
165 }
166 
167 M0_INTERNAL void m0_xc_trigger_rep_fop_struct_init(void)
168 {
169  _trigger_rep_fop._child[0] = (struct m0_xcode_field) {
170  .xf_name = "rc",
171 
172  .xf_type = &M0_XT_U32,
173 
174  .xf_tag = 0,
175  .xf_opaque = NULL,
176  .xf_offset = offsetof(struct trigger_rep_fop, rc),
177  .xf_read = NULL,
178  .xf_decor = {
180  }
181  };
182  m0_xc_u32_init();
183 
185 }
186 
188 {
190  .xf_name = "ssr_rc",
191 
192  .xf_type = &M0_XT_U32,
193 
194  .xf_tag = 0,
195  .xf_opaque = NULL,
196  .xf_offset = offsetof(struct m0_status_rep_fop, ssr_rc),
197  .xf_read = NULL,
198  .xf_decor = {
200  }
201  };
202  m0_xc_u32_init();
203 
205  .xf_name = "ssr_state",
206 
207  .xf_type = &M0_XT_U32,
208 
209  .xf_tag = 0,
210  .xf_opaque = NULL,
211  .xf_offset = offsetof(struct m0_status_rep_fop, ssr_state),
212  .xf_read = NULL,
213  .xf_decor = {
215  }
216  };
217  m0_xc_u32_init();
218 
220  .xf_name = "ssr_progress",
221 
222  .xf_type = &M0_XT_U64,
223 
224  .xf_tag = 0,
225  .xf_opaque = NULL,
226  .xf_offset = offsetof(struct m0_status_rep_fop, ssr_progress),
227  .xf_read = NULL,
228  .xf_decor = {
230  }
231  };
232  m0_xc_u64_init();
233 
235 }
236 
237 M0_INTERNAL void m0_xc_cm_repreb_trigger_fop_init(void)
238 {
243 }
244 
245 M0_INTERNAL void m0_xc_cm_repreb_trigger_fop_fini(void)
246 {
247 }
struct m0_xcode_type * m0_status_rep_fop_xc
#define NULL
Definition: misc.h:38
struct m0_xcode_field _child[1]
static struct _m0_status_rep_fop_s _m0_status_rep_fop
M0_INTERNAL void m0_xc_trigger_fop_struct_init(void)
struct m0_xcode_type _type
uint32_t ssr_state
Definition: trigger_fop.h:48
M0_INTERNAL void m0_xc_trigger_rep_fop_struct_init(void)
struct m0_xcode_type * trigger_fop_xc
struct m0_xcode_field _child[3]
struct m0_xcode_field xct_child[0]
Definition: xcode.h:345
M0_INTERNAL void m0_xc_m0_status_rep_fop_struct_init(void)
op
Definition: libdemo.c:64
uint32_t fd_nr
Definition: trigger_fop.h:47
M0_INTERNAL void m0_xc_failure_data_struct_init(void)
struct m0_xcode_field _child[2]
M0_INTERNAL void m0_xc_cm_repreb_trigger_fop_fini(void)
static struct _failure_data_s _failure_data
#define M0_POST(cond)
struct m0_xcode_type _type
bool m0_xcode_type_invariant(const struct m0_xcode_type *xt)
Definition: xcode.c:74
M0_INTERNAL void m0_xc_cm_repreb_trigger_fop_init(void)
void m0_xc_u64_init(void)
Definition: xcode.c:904
struct m0_xcode_type _type
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[1]
static struct _trigger_rep_fop_s _trigger_rep_fop
void m0_xc_u32_init(void)
Definition: xcode.c:900
const char * xf_name
Definition: xcode.h:251
int32_t ssr_rc
Definition: trigger_fop.h:47
struct m0_xcode_type * failure_data_xc
const struct m0_xcode_type M0_XT_U64
Definition: xcode.c:940
struct m0_xcode_type * trigger_rep_fop_xc
static struct _trigger_fop_s _trigger_fop
uint64_t ssr_progress
Definition: trigger_fop.h:49
int32_t rc
Definition: trigger_fop.h:47
#define offsetof(typ, memb)
Definition: misc.h:29
uint64_t * fd_index
Definition: trigger_fop.h:48
M0_BASSERT(offsetof(struct _failure_data_s, _child[0])==offsetof(struct m0_xcode_type, xct_child[0]))
struct m0_xcode_type _type