Motr  M0
ss_fops_xc.c
Go to the documentation of this file.
1 /* This file is automatically generated from sss/ss_fops.h */
2 
3 #include "lib/misc.h" /* offsetof */
4 #include "lib/assert.h"
5 #include "xcode/xcode.h"
6 
7 #include "sss/ss_fops.h"
8 #include "sss/ss_fops_xc.h"
9 
12 
13 static struct _m0_sss_req_s {
16 } _m0_sss_req = {
17  ._type = {
19  .xct_name = "m0_sss_req",
20  .xct_sizeof = sizeof (struct m0_sss_req),
21  .xct_nr = 4,
22  .xct_flags = M0_XCODE_TYPE_FLAG_DOM_RPC,
23  }
24 };
25 
27 M0_BASSERT(offsetof(struct _m0_sss_req_s, _child[0]) ==
28  offsetof(struct m0_xcode_type, xct_child[0]));
29 
30 static struct _m0_sss_rep_s {
33 } _m0_sss_rep = {
34  ._type = {
36  .xct_name = "m0_sss_rep",
37  .xct_sizeof = sizeof (struct m0_sss_rep),
38  .xct_nr = 2,
39  .xct_flags = M0_XCODE_TYPE_FLAG_DOM_RPC,
40  }
41 };
42 
44 M0_BASSERT(offsetof(struct _m0_sss_rep_s, _child[0]) ==
45  offsetof(struct m0_xcode_type, xct_child[0]));
46 
47 
48 M0_BASSERT(sizeof(struct m0_sss_req) == 56U);
49 
50 M0_BASSERT(sizeof ((struct m0_sss_req *)0)->ss_cmd == 4U);
51 M0_BASSERT(offsetof(struct m0_sss_req, ss_cmd) == 0U);
52 M0_BASSERT(sizeof ((struct m0_sss_req *)0)->ss_name == 16U);
53 M0_BASSERT(offsetof(struct m0_sss_req, ss_name) == 8U);
54 M0_BASSERT(sizeof ((struct m0_sss_req *)0)->ss_id == 16U);
55 M0_BASSERT(offsetof(struct m0_sss_req, ss_id) == 24U);
56 M0_BASSERT(sizeof ((struct m0_sss_req *)0)->ss_param == 16U);
57 M0_BASSERT(offsetof(struct m0_sss_req, ss_param) == 40U);
58 
59 M0_BASSERT(sizeof(struct m0_sss_rep) == 8U);
60 
61 M0_BASSERT(sizeof ((struct m0_sss_rep *)0)->ssr_rc == 4U);
62 M0_BASSERT(offsetof(struct m0_sss_rep, ssr_rc) == 0U);
63 M0_BASSERT(sizeof ((struct m0_sss_rep *)0)->ssr_state == 4U);
64 M0_BASSERT(offsetof(struct m0_sss_rep, ssr_state) == 4U);
65 
66 
67 
68 M0_INTERNAL void m0_xc_m0_sss_req_struct_init(void)
69 {
70  _m0_sss_req._child[0] = (struct m0_xcode_field) {
71  .xf_name = "ss_cmd",
72 
73  .xf_type = &M0_XT_U32,
74 
75  .xf_tag = 0,
76  .xf_opaque = NULL,
77  .xf_offset = offsetof(struct m0_sss_req, ss_cmd),
78  .xf_read = NULL,
79  .xf_decor = {
81  }
82  };
84 
85  _m0_sss_req._child[1] = (struct m0_xcode_field) {
86  .xf_name = "ss_name",
87 
88  .xf_type = m0_buf_xc,
89 
90  .xf_tag = 0,
91  .xf_opaque = NULL,
92  .xf_offset = offsetof(struct m0_sss_req, ss_name),
93  .xf_read = NULL,
94  .xf_decor = {
96  }
97  };
99 
100  _m0_sss_req._child[2] = (struct m0_xcode_field) {
101  .xf_name = "ss_id",
102 
103  .xf_type = m0_fid_xc,
104 
105  .xf_tag = 0,
106  .xf_opaque = NULL,
107  .xf_offset = offsetof(struct m0_sss_req, ss_id),
108  .xf_read = NULL,
109  .xf_decor = {
111  }
112  };
114 
115  _m0_sss_req._child[3] = (struct m0_xcode_field) {
116  .xf_name = "ss_param",
117 
118  .xf_type = m0_buf_xc,
119 
120  .xf_tag = 0,
121  .xf_opaque = NULL,
122  .xf_offset = offsetof(struct m0_sss_req, ss_param),
123  .xf_read = NULL,
124  .xf_decor = {
126  }
127  };
129 
131 }
132 
133 M0_INTERNAL void m0_xc_m0_sss_rep_struct_init(void)
134 {
135  _m0_sss_rep._child[0] = (struct m0_xcode_field) {
136  .xf_name = "ssr_rc",
137 
138  .xf_type = &M0_XT_U32,
139 
140  .xf_tag = 0,
141  .xf_opaque = NULL,
142  .xf_offset = offsetof(struct m0_sss_rep, ssr_rc),
143  .xf_read = NULL,
144  .xf_decor = {
146  }
147  };
148  m0_xc_u32_init();
149 
150  _m0_sss_rep._child[1] = (struct m0_xcode_field) {
151  .xf_name = "ssr_state",
152 
153  .xf_type = &M0_XT_U32,
154 
155  .xf_tag = 0,
156  .xf_opaque = NULL,
157  .xf_offset = offsetof(struct m0_sss_rep, ssr_state),
158  .xf_read = NULL,
159  .xf_decor = {
161  }
162  };
163  m0_xc_u32_init();
164 
166 }
167 
168 M0_INTERNAL void m0_xc_sss_ss_fops_init(void)
169 {
172 }
173 
174 M0_INTERNAL void m0_xc_sss_ss_fops_fini(void)
175 {
176 }
struct m0_xcode_type * m0_buf_xc
Definition: buf_xc.c:10
struct m0_buf ss_name
Definition: ss_fops.h:106
struct m0_xcode_type _type
Definition: ss_fops_xc.c:31
#define NULL
Definition: misc.h:38
M0_BASSERT(offsetof(struct _m0_sss_req_s, _child[0])==offsetof(struct m0_xcode_type, xct_child[0]))
M0_INTERNAL void m0_xc_m0_sss_req_struct_init(void)
Definition: ss_fops_xc.c:68
uint32_t ssr_state
Definition: trigger_fop.h:48
struct m0_buf ss_param
Definition: ss_fops.h:113
struct m0_xcode_field xct_child[0]
Definition: xcode.h:345
M0_INTERNAL void m0_xc_m0_fid_struct_init(void)
Definition: fid_xc.c:64
M0_INTERNAL void m0_xc_m0_buf_struct_init(void)
Definition: buf_xc.c:64
struct m0_xcode_type * m0_sss_rep_xc
Definition: ss_fops_xc.c:11
struct m0_xcode_field _child[2]
Definition: ss_fops_xc.c:32
static struct _m0_sss_req_s _m0_sss_req
#define M0_POST(cond)
struct m0_xcode_field _child[4]
Definition: ss_fops_xc.c:15
bool m0_xcode_type_invariant(const struct m0_xcode_type *xt)
Definition: xcode.c:74
M0_INTERNAL void m0_xc_sss_ss_fops_fini(void)
Definition: ss_fops_xc.c:174
uint32_t ss_cmd
Definition: ss_fops.h:101
struct m0_xcode_type _type
Definition: ss_fops_xc.c:14
const struct m0_xcode_type M0_XT_U32
Definition: xcode.c:932
enum m0_xcode_aggr xct_aggr
Definition: xcode.h:316
struct m0_fid ss_id
Definition: ss_fops.h:111
void m0_xc_u32_init(void)
Definition: xcode.c:900
M0_INTERNAL void m0_xc_m0_sss_rep_struct_init(void)
Definition: ss_fops_xc.c:133
M0_INTERNAL void m0_xc_sss_ss_fops_init(void)
Definition: ss_fops_xc.c:168
const char * xf_name
Definition: xcode.h:251
int32_t ssr_rc
Definition: trigger_fop.h:47
struct m0_xcode_type * m0_fid_xc
Definition: fid_xc.c:10
static struct _m0_sss_rep_s _m0_sss_rep
#define offsetof(typ, memb)
Definition: misc.h:29
struct m0_xcode_type * m0_sss_req_xc
Definition: ss_fops_xc.c:10