Motr  M0
cp_onwire_xc.c
Go to the documentation of this file.
1 /* This file is automatically generated from cm/cp_onwire.h */
2 
3 #include "lib/misc.h" /* offsetof */
4 #include "lib/assert.h"
5 #include "xcode/xcode.h"
6 
7 #include "cm/cp_onwire.h"
8 #include "cm/cp_onwire_xc.h"
9 
12 
13 static struct _m0_cpx_s {
16 } _m0_cpx = {
17  ._type = {
19  .xct_name = "m0_cpx",
20  .xct_sizeof = sizeof (struct m0_cpx),
21  .xct_nr = 6,
22  .xct_flags = M0_XCODE_TYPE_FLAG_DOM_RPC,
23  }
24 };
25 
27 M0_BASSERT(offsetof(struct _m0_cpx_s, _child[0]) ==
28  offsetof(struct m0_xcode_type, xct_child[0]));
29 
30 static struct _m0_cpx_reply_s {
33 } _m0_cpx_reply = {
34  ._type = {
36  .xct_name = "m0_cpx_reply",
37  .xct_sizeof = sizeof (struct m0_cpx_reply),
38  .xct_nr = 1,
39  .xct_flags = M0_XCODE_TYPE_FLAG_DOM_RPC,
40  }
41 };
42 
44 M0_BASSERT(offsetof(struct _m0_cpx_reply_s, _child[0]) ==
45  offsetof(struct m0_xcode_type, xct_child[0]));
46 
47 
48 M0_BASSERT(sizeof(struct m0_cpx) == 88U);
49 
50 M0_BASSERT(sizeof ((struct m0_cpx *)0)->cpx_prio == 4U);
51 M0_BASSERT(offsetof(struct m0_cpx, cpx_prio) == 0U);
52 M0_BASSERT(sizeof ((struct m0_cpx *)0)->cpx_ag_id == 32U);
53 M0_BASSERT(offsetof(struct m0_cpx, cpx_ag_id) == 8U);
54 M0_BASSERT(sizeof ((struct m0_cpx *)0)->cpx_ag_cp_idx == 8U);
55 M0_BASSERT(offsetof(struct m0_cpx, cpx_ag_cp_idx) == 40U);
56 M0_BASSERT(sizeof ((struct m0_cpx *)0)->cpx_bm == 16U);
57 M0_BASSERT(offsetof(struct m0_cpx, cpx_bm) == 48U);
58 M0_BASSERT(sizeof ((struct m0_cpx *)0)->cpx_desc == 16U);
59 M0_BASSERT(offsetof(struct m0_cpx, cpx_desc) == 64U);
60 M0_BASSERT(sizeof ((struct m0_cpx *)0)->cpx_epoch == 8U);
61 M0_BASSERT(offsetof(struct m0_cpx, cpx_epoch) == 80U);
62 
63 M0_BASSERT(sizeof(struct m0_cpx_reply) == 4U);
64 
65 M0_BASSERT(sizeof ((struct m0_cpx_reply *)0)->cr_rc == 4U);
66 M0_BASSERT(offsetof(struct m0_cpx_reply, cr_rc) == 0U);
67 
68 
69 
70 M0_INTERNAL void m0_xc_m0_cpx_struct_init(void)
71 {
72  _m0_cpx._child[0] = (struct m0_xcode_field) {
73  .xf_name = "cpx_prio",
74 
75  .xf_type = &M0_XT_U32,
76 
77  .xf_tag = 0,
78  .xf_opaque = NULL,
79  .xf_offset = offsetof(struct m0_cpx, cpx_prio),
80  .xf_read = NULL,
81  .xf_decor = {
83  }
84  };
86 
87  _m0_cpx._child[1] = (struct m0_xcode_field) {
88  .xf_name = "cpx_ag_id",
89 
90  .xf_type = m0_cm_ag_id_xc,
91 
92  .xf_tag = 0,
93  .xf_opaque = NULL,
94  .xf_offset = offsetof(struct m0_cpx, cpx_ag_id),
95  .xf_read = NULL,
96  .xf_decor = {
98  }
99  };
101 
102  _m0_cpx._child[2] = (struct m0_xcode_field) {
103  .xf_name = "cpx_ag_cp_idx",
104 
105  .xf_type = &M0_XT_U64,
106 
107  .xf_tag = 0,
108  .xf_opaque = NULL,
109  .xf_offset = offsetof(struct m0_cpx, cpx_ag_cp_idx),
110  .xf_read = NULL,
111  .xf_decor = {
113  }
114  };
115  m0_xc_u64_init();
116 
117  _m0_cpx._child[3] = (struct m0_xcode_field) {
118  .xf_name = "cpx_bm",
119 
120  .xf_type = m0_bitmap_onwire_xc,
121 
122  .xf_tag = 0,
123  .xf_opaque = NULL,
124  .xf_offset = offsetof(struct m0_cpx, cpx_bm),
125  .xf_read = NULL,
126  .xf_decor = {
128  }
129  };
131 
132  _m0_cpx._child[4] = (struct m0_xcode_field) {
133  .xf_name = "cpx_desc",
134 
135  .xf_type = m0_io_descs_xc,
136 
137  .xf_tag = 0,
138  .xf_opaque = NULL,
139  .xf_offset = offsetof(struct m0_cpx, cpx_desc),
140  .xf_read = NULL,
141  .xf_decor = {
143  }
144  };
146 
147  _m0_cpx._child[5] = (struct m0_xcode_field) {
148  .xf_name = "cpx_epoch",
149 
150  .xf_type = &M0_XT_U64,
151 
152  .xf_tag = 0,
153  .xf_opaque = NULL,
154  .xf_offset = offsetof(struct m0_cpx, cpx_epoch),
155  .xf_read = NULL,
156  .xf_decor = {
158  }
159  };
160  m0_xc_u64_init();
161 
163 }
164 
165 M0_INTERNAL void m0_xc_m0_cpx_reply_struct_init(void)
166 {
167  _m0_cpx_reply._child[0] = (struct m0_xcode_field) {
168  .xf_name = "cr_rc",
169 
170  .xf_type = &M0_XT_U32,
171 
172  .xf_tag = 0,
173  .xf_opaque = NULL,
174  .xf_offset = offsetof(struct m0_cpx_reply, cr_rc),
175  .xf_read = NULL,
176  .xf_decor = {
178  }
179  };
180  m0_xc_u32_init();
181 
183 }
184 
185 M0_INTERNAL void m0_xc_cm_cp_onwire_init(void)
186 {
189 }
190 
191 M0_INTERNAL void m0_xc_cm_cp_onwire_fini(void)
192 {
193 }
uint64_t cr_rc
Definition: cas.h:340
M0_INTERNAL void m0_xc_cm_cp_onwire_fini(void)
Definition: cp_onwire_xc.c:191
struct m0_xcode_type * m0_cm_ag_id_xc
Definition: ag_xc.c:10
uint32_t cpx_prio
Definition: cp_onwire.h:261
M0_INTERNAL void m0_xc_m0_cm_ag_id_struct_init(void)
Definition: ag_xc.c:39
#define NULL
Definition: misc.h:38
M0_INTERNAL void m0_xc_m0_io_descs_struct_init(void)
Definition: io_fops_xc.c:865
struct m0_xcode_type * m0_cpx_xc
Definition: cp_onwire_xc.c:10
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
static struct _m0_cpx_reply_s _m0_cpx_reply
struct m0_xcode_type * m0_io_descs_xc
Definition: io_fops_xc.c:13
M0_INTERNAL void m0_xc_m0_cpx_reply_struct_init(void)
Definition: cp_onwire_xc.c:165
static struct _m0_cpx_s _m0_cpx
M0_BASSERT(offsetof(struct _m0_cpx_s, _child[0])==offsetof(struct m0_xcode_type, xct_child[0]))
struct m0_xcode_type * m0_bitmap_onwire_xc
Definition: bitmap_xc.c:10
struct m0_xcode_field _child[1]
Definition: cp_onwire_xc.c:32
struct m0_cm_ag_id cpx_ag_id
Definition: cp_onwire.h:267
M0_INTERNAL void m0_xc_m0_cpx_struct_init(void)
Definition: cp_onwire_xc.c:70
#define M0_POST(cond)
bool m0_xcode_type_invariant(const struct m0_xcode_type *xt)
Definition: xcode.c:74
struct m0_bitmap_onwire cpx_bm
Definition: cp_onwire.h:273
M0_INTERNAL void m0_xc_cm_cp_onwire_init(void)
Definition: cp_onwire_xc.c:185
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
uint64_t cpx_ag_cp_idx
Definition: cp_onwire.h:270
struct m0_xcode_type _type
Definition: cp_onwire_xc.c:14
struct m0_xcode_field _child[6]
Definition: cp_onwire_xc.c:15
void m0_xc_u32_init(void)
Definition: xcode.c:900
struct m0_io_descs cpx_desc
Definition: cp_onwire.h:276
const char * xf_name
Definition: xcode.h:251
M0_INTERNAL void m0_xc_m0_bitmap_onwire_struct_init(void)
Definition: bitmap_xc.c:39
m0_time_t cpx_epoch
Definition: cp_onwire.h:282
const struct m0_xcode_type M0_XT_U64
Definition: xcode.c:940
#define offsetof(typ, memb)
Definition: misc.h:29
struct m0_xcode_type _type
Definition: cp_onwire_xc.c:31