Motr  M0
storage_xc.c
Go to the documentation of this file.
1 /* This file is automatically generated from addb2/storage.h */
2 
3 #include "lib/misc.h" /* offsetof */
4 #include "lib/assert.h"
5 #include "xcode/xcode.h"
6 
7 #include "addb2/storage.h"
8 #include "addb2/storage_xc.h"
9 
11 
12 static struct _m0_addb2_frame_header_s {
14  struct m0_xcode_field _child[11];
16  ._type = {
18  .xct_name = "m0_addb2_frame_header",
19  .xct_sizeof = sizeof (struct m0_addb2_frame_header),
20  .xct_nr = 11,
21  .xct_flags = 0,
22  }
23 };
24 
26 M0_BASSERT(offsetof(struct _m0_addb2_frame_header_s, _child[0]) ==
27  offsetof(struct m0_xcode_type, xct_child[0]));
28 
29 
30 M0_BASSERT(sizeof(struct m0_addb2_frame_header) == 104U);
31 
32 M0_BASSERT(sizeof ((struct m0_addb2_frame_header *)0)->he_header == 16U);
33 M0_BASSERT(offsetof(struct m0_addb2_frame_header, he_header) == 0U);
34 M0_BASSERT(sizeof ((struct m0_addb2_frame_header *)0)->he_seqno == 8U);
35 M0_BASSERT(offsetof(struct m0_addb2_frame_header, he_seqno) == 16U);
36 M0_BASSERT(sizeof ((struct m0_addb2_frame_header *)0)->he_offset == 8U);
37 M0_BASSERT(offsetof(struct m0_addb2_frame_header, he_offset) == 24U);
38 M0_BASSERT(sizeof ((struct m0_addb2_frame_header *)0)->he_prev_offset == 8U);
39 M0_BASSERT(offsetof(struct m0_addb2_frame_header, he_prev_offset) == 32U);
40 M0_BASSERT(sizeof ((struct m0_addb2_frame_header *)0)->he_trace_nr == 4U);
41 M0_BASSERT(offsetof(struct m0_addb2_frame_header, he_trace_nr) == 40U);
42 M0_BASSERT(sizeof ((struct m0_addb2_frame_header *)0)->he_size == 4U);
43 M0_BASSERT(offsetof(struct m0_addb2_frame_header, he_size) == 44U);
44 M0_BASSERT(sizeof ((struct m0_addb2_frame_header *)0)->he_time == 8U);
45 M0_BASSERT(offsetof(struct m0_addb2_frame_header, he_time) == 48U);
46 M0_BASSERT(sizeof ((struct m0_addb2_frame_header *)0)->he_stob_size == 8U);
47 M0_BASSERT(offsetof(struct m0_addb2_frame_header, he_stob_size) == 56U);
48 M0_BASSERT(sizeof ((struct m0_addb2_frame_header *)0)->he_magix == 8U);
49 M0_BASSERT(offsetof(struct m0_addb2_frame_header, he_magix) == 64U);
50 M0_BASSERT(sizeof ((struct m0_addb2_frame_header *)0)->he_fid == 16U);
51 M0_BASSERT(offsetof(struct m0_addb2_frame_header, he_fid) == 72U);
52 M0_BASSERT(sizeof ((struct m0_addb2_frame_header *)0)->he_footer == 16U);
53 M0_BASSERT(offsetof(struct m0_addb2_frame_header, he_footer) == 88U);
54 
55 
56 
58 {
60  .xf_name = "he_header",
61 
62  .xf_type = m0_format_header_xc,
63 
64  .xf_tag = 0,
65  .xf_opaque = NULL,
66  .xf_offset = offsetof(struct m0_addb2_frame_header, he_header),
67  .xf_read = NULL,
68  .xf_decor = {
70  }
71  };
73 
75  .xf_name = "he_seqno",
76 
77  .xf_type = &M0_XT_U64,
78 
79  .xf_tag = 0,
80  .xf_opaque = NULL,
81  .xf_offset = offsetof(struct m0_addb2_frame_header, he_seqno),
82  .xf_read = NULL,
83  .xf_decor = {
85  }
86  };
88 
90  .xf_name = "he_offset",
91 
92  .xf_type = &M0_XT_U64,
93 
94  .xf_tag = 0,
95  .xf_opaque = NULL,
96  .xf_offset = offsetof(struct m0_addb2_frame_header, he_offset),
97  .xf_read = NULL,
98  .xf_decor = {
100  }
101  };
102  m0_xc_u64_init();
103 
105  .xf_name = "he_prev_offset",
106 
107  .xf_type = &M0_XT_U64,
108 
109  .xf_tag = 0,
110  .xf_opaque = NULL,
111  .xf_offset = offsetof(struct m0_addb2_frame_header, he_prev_offset),
112  .xf_read = NULL,
113  .xf_decor = {
115  }
116  };
117  m0_xc_u64_init();
118 
120  .xf_name = "he_trace_nr",
121 
122  .xf_type = &M0_XT_U32,
123 
124  .xf_tag = 0,
125  .xf_opaque = NULL,
126  .xf_offset = offsetof(struct m0_addb2_frame_header, he_trace_nr),
127  .xf_read = NULL,
128  .xf_decor = {
130  }
131  };
132  m0_xc_u32_init();
133 
135  .xf_name = "he_size",
136 
137  .xf_type = &M0_XT_U32,
138 
139  .xf_tag = 0,
140  .xf_opaque = NULL,
141  .xf_offset = offsetof(struct m0_addb2_frame_header, he_size),
142  .xf_read = NULL,
143  .xf_decor = {
145  }
146  };
147  m0_xc_u32_init();
148 
150  .xf_name = "he_time",
151 
152  .xf_type = &M0_XT_U64,
153 
154  .xf_tag = 0,
155  .xf_opaque = NULL,
156  .xf_offset = offsetof(struct m0_addb2_frame_header, he_time),
157  .xf_read = NULL,
158  .xf_decor = {
160  }
161  };
162  m0_xc_u64_init();
163 
165  .xf_name = "he_stob_size",
166 
167  .xf_type = &M0_XT_U64,
168 
169  .xf_tag = 0,
170  .xf_opaque = NULL,
171  .xf_offset = offsetof(struct m0_addb2_frame_header, he_stob_size),
172  .xf_read = NULL,
173  .xf_decor = {
175  }
176  };
177  m0_xc_u64_init();
178 
180  .xf_name = "he_magix",
181 
182  .xf_type = &M0_XT_U64,
183 
184  .xf_tag = 0,
185  .xf_opaque = NULL,
186  .xf_offset = offsetof(struct m0_addb2_frame_header, he_magix),
187  .xf_read = NULL,
188  .xf_decor = {
190  }
191  };
192  m0_xc_u64_init();
193 
195  .xf_name = "he_fid",
196 
197  .xf_type = m0_fid_xc,
198 
199  .xf_tag = 0,
200  .xf_opaque = NULL,
201  .xf_offset = offsetof(struct m0_addb2_frame_header, he_fid),
202  .xf_read = NULL,
203  .xf_decor = {
205  }
206  };
208 
210  .xf_name = "he_footer",
211 
212  .xf_type = m0_format_footer_xc,
213 
214  .xf_tag = 0,
215  .xf_opaque = NULL,
216  .xf_offset = offsetof(struct m0_addb2_frame_header, he_footer),
217  .xf_read = NULL,
218  .xf_decor = {
220  }
221  };
223 
225 }
226 
227 M0_INTERNAL void m0_xc_addb2_storage_init(void)
228 {
230 }
231 
232 M0_INTERNAL void m0_xc_addb2_storage_fini(void)
233 {
234 }
#define NULL
Definition: misc.h:38
M0_INTERNAL void m0_xc_m0_format_footer_struct_init(void)
Definition: format_xc.c:226
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
struct m0_xcode_type _type
Definition: storage_xc.c:13
#define M0_POST(cond)
bool m0_xcode_type_invariant(const struct m0_xcode_type *xt)
Definition: xcode.c:74
M0_INTERNAL void m0_xc_m0_format_header_struct_init(void)
Definition: format_xc.c:191
void m0_xc_u64_init(void)
Definition: xcode.c:904
M0_BASSERT(offsetof(struct _m0_addb2_frame_header_s, _child[0])==offsetof(struct m0_xcode_type, xct_child[0]))
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_type * m0_format_header_xc
Definition: format_xc.c:10
M0_INTERNAL void m0_xc_addb2_storage_init(void)
Definition: storage_xc.c:227
M0_INTERNAL void m0_xc_addb2_storage_fini(void)
Definition: storage_xc.c:232
struct m0_xcode_type * m0_addb2_frame_header_xc
Definition: storage_xc.c:10
struct m0_xcode_field _child[11]
Definition: storage_xc.c:14
static struct _m0_addb2_frame_header_s _m0_addb2_frame_header
void m0_xc_u32_init(void)
Definition: xcode.c:900
const char * xf_name
Definition: xcode.h:251
M0_INTERNAL void m0_xc_m0_addb2_frame_header_struct_init(void)
Definition: storage_xc.c:57
struct m0_xcode_type * m0_fid_xc
Definition: fid_xc.c:10
const struct m0_xcode_type M0_XT_U64
Definition: xcode.c:940
#define offsetof(typ, memb)
Definition: misc.h:29
struct m0_xcode_type * m0_format_footer_xc
Definition: format_xc.c:11