Motr  M0
fol_xc.c
Go to the documentation of this file.
1 /* This file is automatically generated from fol/fol.h */
2 
3 #include "lib/misc.h" /* offsetof */
4 #include "lib/assert.h"
5 #include "xcode/xcode.h"
6 
7 #include "fol/fol.h"
8 #include "fol/fol_xc.h"
9 
12 
13 static struct _m0_fol_rec_header_s {
17  ._type = {
19  .xct_name = "m0_fol_rec_header",
20  .xct_sizeof = sizeof (struct m0_fol_rec_header),
21  .xct_nr = 6,
22  .xct_flags = 0,
23  }
24 };
25 
27 M0_BASSERT(offsetof(struct _m0_fol_rec_header_s, _child[0]) ==
28  offsetof(struct m0_xcode_type, xct_child[0]));
29 
30 static struct _m0_fol_frag_header_s {
34  ._type = {
36  .xct_name = "m0_fol_frag_header",
37  .xct_sizeof = sizeof (struct m0_fol_frag_header),
38  .xct_nr = 2,
39  .xct_flags = 0,
40  }
41 };
42 
44 M0_BASSERT(offsetof(struct _m0_fol_frag_header_s, _child[0]) ==
45  offsetof(struct m0_xcode_type, xct_child[0]));
46 
47 
48 M0_BASSERT(sizeof(struct m0_fol_rec_header) == 48U);
49 
50 M0_BASSERT(sizeof ((struct m0_fol_rec_header *)0)->rh_frags_nr == 4U);
51 M0_BASSERT(offsetof(struct m0_fol_rec_header, rh_frags_nr) == 0U);
52 M0_BASSERT(sizeof ((struct m0_fol_rec_header *)0)->rh_data_len == 4U);
53 M0_BASSERT(offsetof(struct m0_fol_rec_header, rh_data_len) == 4U);
54 M0_BASSERT(sizeof ((struct m0_fol_rec_header *)0)->rh_self == 16U);
55 M0_BASSERT(offsetof(struct m0_fol_rec_header, rh_self) == 8U);
56 M0_BASSERT(sizeof ((struct m0_fol_rec_header *)0)->rh_lsn == 8U);
57 M0_BASSERT(offsetof(struct m0_fol_rec_header, rh_lsn) == 24U);
58 M0_BASSERT(sizeof ((struct m0_fol_rec_header *)0)->rh_lsn_discarded == 8U);
59 M0_BASSERT(offsetof(struct m0_fol_rec_header, rh_lsn_discarded) == 32U);
60 M0_BASSERT(sizeof ((struct m0_fol_rec_header *)0)->rh_magic == 8U);
61 M0_BASSERT(offsetof(struct m0_fol_rec_header, rh_magic) == 40U);
62 
63 M0_BASSERT(sizeof(struct m0_fol_frag_header) == 16U);
64 
65 M0_BASSERT(sizeof ((struct m0_fol_frag_header *)0)->rph_index == 4U);
66 M0_BASSERT(offsetof(struct m0_fol_frag_header, rph_index) == 0U);
67 M0_BASSERT(sizeof ((struct m0_fol_frag_header *)0)->rph_magic == 8U);
68 M0_BASSERT(offsetof(struct m0_fol_frag_header, rph_magic) == 8U);
69 
70 
71 
73 {
75  .xf_name = "rh_frags_nr",
76 
77  .xf_type = &M0_XT_U32,
78 
79  .xf_tag = 0,
80  .xf_opaque = NULL,
81  .xf_offset = offsetof(struct m0_fol_rec_header, rh_frags_nr),
82  .xf_read = NULL,
83  .xf_decor = {
85  }
86  };
88 
90  .xf_name = "rh_data_len",
91 
92  .xf_type = &M0_XT_U32,
93 
94  .xf_tag = 0,
95  .xf_opaque = NULL,
96  .xf_offset = offsetof(struct m0_fol_rec_header, rh_data_len),
97  .xf_read = NULL,
98  .xf_decor = {
100  }
101  };
102  m0_xc_u32_init();
103 
105  .xf_name = "rh_self",
106 
107  .xf_type = m0_update_id_xc,
108 
109  .xf_tag = 0,
110  .xf_opaque = NULL,
111  .xf_offset = offsetof(struct m0_fol_rec_header, rh_self),
112  .xf_read = NULL,
113  .xf_decor = {
115  }
116  };
118 
120  .xf_name = "rh_lsn",
121 
122  .xf_type = &M0_XT_U64,
123 
124  .xf_tag = 0,
125  .xf_opaque = NULL,
126  .xf_offset = offsetof(struct m0_fol_rec_header, rh_lsn),
127  .xf_read = NULL,
128  .xf_decor = {
130  }
131  };
132  m0_xc_u64_init();
133 
135  .xf_name = "rh_lsn_discarded",
136 
137  .xf_type = &M0_XT_U64,
138 
139  .xf_tag = 0,
140  .xf_opaque = NULL,
141  .xf_offset = offsetof(struct m0_fol_rec_header, rh_lsn_discarded),
142  .xf_read = NULL,
143  .xf_decor = {
145  }
146  };
147  m0_xc_u64_init();
148 
150  .xf_name = "rh_magic",
151 
152  .xf_type = &M0_XT_U64,
153 
154  .xf_tag = 0,
155  .xf_opaque = NULL,
156  .xf_offset = offsetof(struct m0_fol_rec_header, rh_magic),
157  .xf_read = NULL,
158  .xf_decor = {
160  }
161  };
162  m0_xc_u64_init();
163 
165 }
166 
168 {
170  .xf_name = "rph_index",
171 
172  .xf_type = &M0_XT_U32,
173 
174  .xf_tag = 0,
175  .xf_opaque = NULL,
176  .xf_offset = offsetof(struct m0_fol_frag_header, rph_index),
177  .xf_read = NULL,
178  .xf_decor = {
180  }
181  };
182  m0_xc_u32_init();
183 
185  .xf_name = "rph_magic",
186 
187  .xf_type = &M0_XT_U64,
188 
189  .xf_tag = 0,
190  .xf_opaque = NULL,
191  .xf_offset = offsetof(struct m0_fol_frag_header, rph_magic),
192  .xf_read = NULL,
193  .xf_decor = {
195  }
196  };
197  m0_xc_u64_init();
198 
200 }
201 
202 M0_INTERNAL void m0_xc_fol_fol_init(void)
203 {
206 }
207 
208 M0_INTERNAL void m0_xc_fol_fol_fini(void)
209 {
210 }
M0_INTERNAL void m0_xc_m0_fol_rec_header_struct_init(void)
Definition: fol_xc.c:72
M0_INTERNAL void m0_xc_m0_update_id_struct_init(void)
Definition: dtm_update_xc.c:39
#define NULL
Definition: misc.h:38
struct m0_xcode_type _type
Definition: fol_xc.c:14
struct m0_xcode_type _type
Definition: fol_xc.c:31
struct m0_xcode_field xct_child[0]
Definition: xcode.h:345
struct m0_xcode_type * m0_update_id_xc
Definition: dtm_update_xc.c:10
struct m0_xcode_field _child[2]
Definition: fol_xc.c:32
static struct _m0_fol_rec_header_s _m0_fol_rec_header
struct m0_xcode_field _child[6]
Definition: fol_xc.c:15
struct m0_xcode_type * m0_fol_rec_header_xc
Definition: fol_xc.c:10
static struct _m0_fol_frag_header_s _m0_fol_frag_header
#define M0_POST(cond)
bool m0_xcode_type_invariant(const struct m0_xcode_type *xt)
Definition: xcode.c:74
struct m0_xcode_type * m0_fol_frag_header_xc
Definition: fol_xc.c:11
void m0_xc_u64_init(void)
Definition: xcode.c:904
M0_INTERNAL void m0_xc_fol_fol_init(void)
Definition: fol_xc.c:202
const struct m0_xcode_type M0_XT_U32
Definition: xcode.c:932
enum m0_xcode_aggr xct_aggr
Definition: xcode.h:316
M0_INTERNAL void m0_xc_fol_fol_fini(void)
Definition: fol_xc.c:208
void m0_xc_u32_init(void)
Definition: xcode.c:900
const char * xf_name
Definition: xcode.h:251
const struct m0_xcode_type M0_XT_U64
Definition: xcode.c:940
M0_INTERNAL void m0_xc_m0_fol_frag_header_struct_init(void)
Definition: fol_xc.c:167
#define offsetof(typ, memb)
Definition: misc.h:29
M0_BASSERT(offsetof(struct _m0_fol_rec_header_s, _child[0])==offsetof(struct m0_xcode_type, xct_child[0]))