Motr  M0
cs_fop_xc.c
Go to the documentation of this file.
1 /* This file is automatically generated from ut/cs_fop.h */
2 
3 #include "lib/misc.h" /* offsetof */
4 #include "lib/assert.h"
5 #include "xcode/xcode.h"
6 
7 #include "ut/cs_fop.h"
8 #include "ut/cs_fop_xc.h"
9 
14 
15 static struct _cs_ds1_req_fop_s {
18 } _cs_ds1_req_fop = {
19  ._type = {
21  .xct_name = "cs_ds1_req_fop",
22  .xct_sizeof = sizeof (struct cs_ds1_req_fop),
23  .xct_nr = 1,
24  .xct_flags = M0_XCODE_TYPE_FLAG_DOM_RPC,
25  }
26 };
27 
29 M0_BASSERT(offsetof(struct _cs_ds1_req_fop_s, _child[0]) ==
30  offsetof(struct m0_xcode_type, xct_child[0]));
31 
32 static struct _cs_ds1_rep_fop_s {
35 } _cs_ds1_rep_fop = {
36  ._type = {
38  .xct_name = "cs_ds1_rep_fop",
39  .xct_sizeof = sizeof (struct cs_ds1_rep_fop),
40  .xct_nr = 1,
41  .xct_flags = M0_XCODE_TYPE_FLAG_DOM_RPC,
42  }
43 };
44 
46 M0_BASSERT(offsetof(struct _cs_ds1_rep_fop_s, _child[0]) ==
47  offsetof(struct m0_xcode_type, xct_child[0]));
48 
49 static struct _cs_ds2_req_fop_s {
52 } _cs_ds2_req_fop = {
53  ._type = {
55  .xct_name = "cs_ds2_req_fop",
56  .xct_sizeof = sizeof (struct cs_ds2_req_fop),
57  .xct_nr = 1,
58  .xct_flags = M0_XCODE_TYPE_FLAG_DOM_RPC,
59  }
60 };
61 
63 M0_BASSERT(offsetof(struct _cs_ds2_req_fop_s, _child[0]) ==
64  offsetof(struct m0_xcode_type, xct_child[0]));
65 
66 static struct _cs_ds2_rep_fop_s {
69 } _cs_ds2_rep_fop = {
70  ._type = {
72  .xct_name = "cs_ds2_rep_fop",
73  .xct_sizeof = sizeof (struct cs_ds2_rep_fop),
74  .xct_nr = 1,
75  .xct_flags = M0_XCODE_TYPE_FLAG_DOM_RPC,
76  }
77 };
78 
80 M0_BASSERT(offsetof(struct _cs_ds2_rep_fop_s, _child[0]) ==
81  offsetof(struct m0_xcode_type, xct_child[0]));
82 
83 
84 M0_BASSERT(sizeof(struct cs_ds1_req_fop) == 8U);
85 
86 M0_BASSERT(sizeof ((struct cs_ds1_req_fop *)0)->csr_value == 8U);
88 
89 M0_BASSERT(sizeof(struct cs_ds1_rep_fop) == 4U);
90 
91 M0_BASSERT(sizeof ((struct cs_ds1_rep_fop *)0)->csr_rc == 4U);
93 
94 M0_BASSERT(sizeof(struct cs_ds2_req_fop) == 8U);
95 
96 M0_BASSERT(sizeof ((struct cs_ds2_req_fop *)0)->csr_value == 8U);
98 
99 M0_BASSERT(sizeof(struct cs_ds2_rep_fop) == 4U);
100 
101 M0_BASSERT(sizeof ((struct cs_ds2_rep_fop *)0)->csr_rc == 4U);
102 M0_BASSERT(offsetof(struct cs_ds2_rep_fop, csr_rc) == 0U);
103 
104 
105 
106 M0_INTERNAL void m0_xc_cs_ds1_req_fop_struct_init(void)
107 {
108  _cs_ds1_req_fop._child[0] = (struct m0_xcode_field) {
109  .xf_name = "csr_value",
110 
111  .xf_type = &M0_XT_U64,
112 
113  .xf_tag = 0,
114  .xf_opaque = NULL,
115  .xf_offset = offsetof(struct cs_ds1_req_fop, csr_value),
116  .xf_read = NULL,
117  .xf_decor = {
119  }
120  };
121  m0_xc_u64_init();
122 
124 }
125 
126 M0_INTERNAL void m0_xc_cs_ds1_rep_fop_struct_init(void)
127 {
128  _cs_ds1_rep_fop._child[0] = (struct m0_xcode_field) {
129  .xf_name = "csr_rc",
130 
131  .xf_type = &M0_XT_U32,
132 
133  .xf_tag = 0,
134  .xf_opaque = NULL,
135  .xf_offset = offsetof(struct cs_ds1_rep_fop, csr_rc),
136  .xf_read = NULL,
137  .xf_decor = {
139  }
140  };
141  m0_xc_u32_init();
142 
144 }
145 
146 M0_INTERNAL void m0_xc_cs_ds2_req_fop_struct_init(void)
147 {
148  _cs_ds2_req_fop._child[0] = (struct m0_xcode_field) {
149  .xf_name = "csr_value",
150 
151  .xf_type = &M0_XT_U64,
152 
153  .xf_tag = 0,
154  .xf_opaque = NULL,
155  .xf_offset = offsetof(struct cs_ds2_req_fop, csr_value),
156  .xf_read = NULL,
157  .xf_decor = {
159  }
160  };
161  m0_xc_u64_init();
162 
164 }
165 
166 M0_INTERNAL void m0_xc_cs_ds2_rep_fop_struct_init(void)
167 {
168  _cs_ds2_rep_fop._child[0] = (struct m0_xcode_field) {
169  .xf_name = "csr_rc",
170 
171  .xf_type = &M0_XT_U32,
172 
173  .xf_tag = 0,
174  .xf_opaque = NULL,
175  .xf_offset = offsetof(struct cs_ds2_rep_fop, csr_rc),
176  .xf_read = NULL,
177  .xf_decor = {
179  }
180  };
181  m0_xc_u32_init();
182 
184 }
185 
186 M0_INTERNAL void m0_xc_ut_cs_fop_init(void)
187 {
192 }
193 
194 M0_INTERNAL void m0_xc_ut_cs_fop_fini(void)
195 {
196 }
struct m0_xcode_type * cs_ds2_req_fop_xc
Definition: cs_fop_xc.c:12
struct m0_xcode_type _type
Definition: cs_fop_xc.c:16
int32_t csr_rc
Definition: io_fops.h:278
#define NULL
Definition: misc.h:38
static struct _cs_ds1_rep_fop_s _cs_ds1_rep_fop
struct m0_xcode_field _child[1]
Definition: cs_fop_xc.c:68
struct m0_xcode_field xct_child[0]
Definition: xcode.h:345
M0_INTERNAL void m0_xc_ut_cs_fop_init(void)
Definition: cs_fop_xc.c:186
struct m0_xcode_type * cs_ds1_rep_fop_xc
Definition: cs_fop_xc.c:11
M0_INTERNAL void m0_xc_cs_ds1_req_fop_struct_init(void)
Definition: cs_fop_xc.c:106
struct m0_xcode_type _type
Definition: cs_fop_xc.c:33
struct m0_xcode_type * cs_ds2_rep_fop_xc
Definition: cs_fop_xc.c:13
uint64_t csr_value
Definition: cs_fop.h:73
M0_INTERNAL void m0_xc_cs_ds1_rep_fop_struct_init(void)
Definition: cs_fop_xc.c:126
struct m0_xcode_type * cs_ds1_req_fop_xc
Definition: cs_fop_xc.c:10
struct m0_xcode_field _child[1]
Definition: cs_fop_xc.c:17
M0_INTERNAL void m0_xc_cs_ds2_rep_fop_struct_init(void)
Definition: cs_fop_xc.c:166
static struct _cs_ds1_req_fop_s _cs_ds1_req_fop
#define M0_POST(cond)
bool m0_xcode_type_invariant(const struct m0_xcode_type *xt)
Definition: xcode.c:74
struct m0_xcode_type _type
Definition: cs_fop_xc.c:50
void m0_xc_u64_init(void)
Definition: xcode.c:904
static struct _cs_ds2_req_fop_s _cs_ds2_req_fop
static struct _cs_ds2_rep_fop_s _cs_ds2_rep_fop
struct m0_xcode_field _child[1]
Definition: cs_fop_xc.c:34
const struct m0_xcode_type M0_XT_U32
Definition: xcode.c:932
enum m0_xcode_aggr xct_aggr
Definition: xcode.h:316
M0_BASSERT(offsetof(struct _cs_ds1_req_fop_s, _child[0])==offsetof(struct m0_xcode_type, xct_child[0]))
void m0_xc_u32_init(void)
Definition: xcode.c:900
M0_INTERNAL void m0_xc_ut_cs_fop_fini(void)
Definition: cs_fop_xc.c:194
const char * xf_name
Definition: xcode.h:251
M0_INTERNAL void m0_xc_cs_ds2_req_fop_struct_init(void)
Definition: cs_fop_xc.c:146
struct m0_xcode_type _type
Definition: cs_fop_xc.c:67
const struct m0_xcode_type M0_XT_U64
Definition: xcode.c:940
#define offsetof(typ, memb)
Definition: misc.h:29
struct m0_xcode_field _child[1]
Definition: cs_fop_xc.c:51