Motr  M0
extmap_xc.c
Go to the documentation of this file.
1 /* This file is automatically generated from be/extmap.h */
2 
3 #include "lib/misc.h" /* offsetof */
4 #include "lib/assert.h"
5 #include "xcode/xcode.h"
6 
7 #include "be/extmap.h"
8 #include "be/extmap_xc.h"
9 
10 #if !defined(__KERNEL__)
12 #endif
13 
14 #if !defined(__KERNEL__)
15 static struct _m0_be_emap_seg_s {
18 } _m0_be_emap_seg = {
19  ._type = {
21  .xct_name = "m0_be_emap_seg",
22  .xct_sizeof = sizeof (struct m0_be_emap_seg),
23  .xct_nr = 4,
24  .xct_flags = M0_XCODE_TYPE_FLAG_DOM_BE,
25  }
26 };
27 
29 M0_BASSERT(offsetof(struct _m0_be_emap_seg_s, _child[0]) ==
30  offsetof(struct m0_xcode_type, xct_child[0]));
31 #endif
32 
33 
34 #if !defined(__KERNEL__)
35 M0_BASSERT(sizeof(struct m0_be_emap_seg) == 88U);
36 #endif
37 
38 #if !defined(__KERNEL__)
39 M0_BASSERT(sizeof ((struct m0_be_emap_seg *)0)->ee_pre == 16U);
41 #endif
42 #if !defined(__KERNEL__)
43 M0_BASSERT(sizeof ((struct m0_be_emap_seg *)0)->ee_ext == 48U);
44 M0_BASSERT(offsetof(struct m0_be_emap_seg, ee_ext) == 16U);
45 #endif
46 #if !defined(__KERNEL__)
47 M0_BASSERT(sizeof ((struct m0_be_emap_seg *)0)->ee_val == 8U);
48 M0_BASSERT(offsetof(struct m0_be_emap_seg, ee_val) == 64U);
49 #endif
50 #if !defined(__KERNEL__)
51 M0_BASSERT(sizeof ((struct m0_be_emap_seg *)0)->ee_cksum_buf == 16U);
53 #endif
54 
55 
56 
57 #if !defined(__KERNEL__)
58 M0_INTERNAL void m0_xc_m0_be_emap_seg_struct_init(void)
59 {
60  _m0_be_emap_seg._child[0] = (struct m0_xcode_field) {
61  .xf_name = "ee_pre",
62 
63  .xf_type = m0_uint128_xc,
64 
65  .xf_tag = 0,
66  .xf_opaque = NULL,
67  .xf_offset = offsetof(struct m0_be_emap_seg, ee_pre),
68  .xf_read = NULL,
69  .xf_decor = {
71  }
72  };
74 
75  _m0_be_emap_seg._child[1] = (struct m0_xcode_field) {
76  .xf_name = "ee_ext",
77 
78  .xf_type = m0_ext_xc,
79 
80  .xf_tag = 0,
81  .xf_opaque = NULL,
82  .xf_offset = offsetof(struct m0_be_emap_seg, ee_ext),
83  .xf_read = NULL,
84  .xf_decor = {
86  }
87  };
89 
90  _m0_be_emap_seg._child[2] = (struct m0_xcode_field) {
91  .xf_name = "ee_val",
92 
93  .xf_type = &M0_XT_U64,
94 
95  .xf_tag = 0,
96  .xf_opaque = NULL,
97  .xf_offset = offsetof(struct m0_be_emap_seg, ee_val),
98  .xf_read = NULL,
99  .xf_decor = {
101  }
102  };
103  m0_xc_u64_init();
104 
105  _m0_be_emap_seg._child[3] = (struct m0_xcode_field) {
106  .xf_name = "ee_cksum_buf",
107 
108  .xf_type = m0_buf_xc,
109 
110  .xf_tag = 0,
111  .xf_opaque = NULL,
112  .xf_offset = offsetof(struct m0_be_emap_seg, ee_cksum_buf),
113  .xf_read = NULL,
114  .xf_decor = {
116  }
117  };
119 
121 }
122 #endif
123 
124 M0_INTERNAL void m0_xc_be_extmap_init(void)
125 {
126 #if !defined(__KERNEL__)
128 #endif
129 }
130 
131 M0_INTERNAL void m0_xc_be_extmap_fini(void)
132 {
133 }
struct m0_xcode_type * m0_buf_xc
Definition: buf_xc.c:10
static struct _m0_be_emap_seg_s _m0_be_emap_seg
#define NULL
Definition: misc.h:38
struct m0_xcode_type * m0_ext_xc
Definition: ext_xc.c:10
struct m0_buf ee_cksum_buf
Definition: extmap.h:188
struct m0_ext ee_ext
Definition: extmap.h:185
struct m0_xcode_type * m0_uint128_xc
Definition: types_xc.c:10
struct m0_xcode_field xct_child[0]
Definition: xcode.h:345
struct m0_uint128 ee_pre
Definition: extmap.h:183
M0_INTERNAL void m0_xc_m0_uint128_struct_init(void)
Definition: types_xc.c:39
M0_INTERNAL void m0_xc_m0_buf_struct_init(void)
Definition: buf_xc.c:64
uint64_t ee_val
Definition: extmap.h:187
M0_BASSERT(offsetof(struct _m0_be_emap_seg_s, _child[0])==offsetof(struct m0_xcode_type, xct_child[0]))
#define M0_POST(cond)
bool m0_xcode_type_invariant(const struct m0_xcode_type *xt)
Definition: xcode.c:74
void m0_xc_u64_init(void)
Definition: xcode.c:904
enum m0_xcode_aggr xct_aggr
Definition: xcode.h:316
M0_INTERNAL void m0_xc_be_extmap_init(void)
Definition: extmap_xc.c:124
M0_INTERNAL void m0_xc_m0_ext_struct_init(void)
Definition: ext_xc.c:43
M0_INTERNAL void m0_xc_be_extmap_fini(void)
Definition: extmap_xc.c:131
struct m0_xcode_type _type
Definition: extmap_xc.c:16
const char * xf_name
Definition: xcode.h:251
M0_INTERNAL void m0_xc_m0_be_emap_seg_struct_init(void)
Definition: extmap_xc.c:58
const struct m0_xcode_type M0_XT_U64
Definition: xcode.c:940
struct m0_xcode_field _child[4]
Definition: extmap_xc.c:17
#define offsetof(typ, memb)
Definition: misc.h:29
struct m0_xcode_type * m0_be_emap_seg_xc
Definition: extmap_xc.c:11