Motr  M0
bitstring_xc.c
Go to the documentation of this file.
1 /* This file is automatically generated from lib/bitstring.h */
2 
3 #include "lib/misc.h" /* offsetof */
4 #include "lib/assert.h"
5 #include "xcode/xcode.h"
6 
7 #include "lib/bitstring.h"
8 #include "lib/bitstring_xc.h"
9 
10 #if !defined(__KERNEL__)
12 #endif
13 
14 #if !defined(__KERNEL__)
15 static struct _m0_bitstring_s {
18 } _m0_bitstring = {
19  ._type = {
21  .xct_name = "m0_bitstring",
22  .xct_sizeof = sizeof (struct m0_bitstring),
23  .xct_nr = 2,
24  .xct_flags = M0_XCODE_TYPE_FLAG_DOM_BE,
25  }
26 };
27 
29 M0_BASSERT(offsetof(struct _m0_bitstring_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_bitstring) == 4U);
36 #endif
37 
38 #if !defined(__KERNEL__)
39 M0_BASSERT(sizeof ((struct m0_bitstring *)0)->b_len == 4U);
40 M0_BASSERT(offsetof(struct m0_bitstring, b_len) == 0U);
41 #endif
42 #if !defined(__KERNEL__)
43 M0_BASSERT(sizeof ((struct m0_bitstring *)0)->b_data == 0U);
44 M0_BASSERT(offsetof(struct m0_bitstring, b_data) == 4U);
45 #endif
46 
47 
48 
49 #if !defined(__KERNEL__)
50 M0_INTERNAL void m0_xc_m0_bitstring_struct_init(void)
51 {
52  _m0_bitstring._child[0] = (struct m0_xcode_field) {
53  .xf_name = "b_len",
54 
55  .xf_type = &M0_XT_U32,
56 
57  .xf_tag = 0,
58  .xf_opaque = NULL,
59  .xf_offset = offsetof(struct m0_bitstring, b_len),
60  .xf_read = NULL,
61  .xf_decor = {
63  }
64  };
66 
67  _m0_bitstring._child[1] = (struct m0_xcode_field) {
68  .xf_name = "b_data",
69 
70  .xf_type = &M0_XT_VOID,
71 
72  .xf_tag = 0,
73  .xf_opaque = NULL,
74  .xf_offset = offsetof(struct m0_bitstring, b_data),
75  .xf_read = NULL,
76  .xf_decor = {
78  }
79  };
81 
83 }
84 #endif
85 
86 M0_INTERNAL void m0_xc_lib_bitstring_init(void)
87 {
88 #if !defined(__KERNEL__)
90 #endif
91 }
92 
93 M0_INTERNAL void m0_xc_lib_bitstring_fini(void)
94 {
95 }
struct m0_xcode_type _type
Definition: bitstring_xc.c:16
static struct _m0_bitstring_s _m0_bitstring
#define NULL
Definition: misc.h:38
M0_INTERNAL void m0_xc_lib_bitstring_init(void)
Definition: bitstring_xc.c:86
struct m0_xcode_field xct_child[0]
Definition: xcode.h:345
void m0_xc_void_init(void)
Definition: xcode.c:908
M0_INTERNAL void m0_xc_lib_bitstring_fini(void)
Definition: bitstring_xc.c:93
const struct m0_xcode_type M0_XT_VOID
Definition: xcode.c:916
struct m0_xcode_type * m0_bitstring_xc
Definition: bitstring_xc.c:11
uint32_t b_len
Definition: bitstring.h:76
M0_INTERNAL void m0_xc_m0_bitstring_struct_init(void)
Definition: bitstring_xc.c:50
M0_BASSERT(offsetof(struct _m0_bitstring_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
char b_data[0]
Definition: bitstring.h:77
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_field _child[2]
Definition: bitstring_xc.c:17
void m0_xc_u32_init(void)
Definition: xcode.c:900
const char * xf_name
Definition: xcode.h:251
#define offsetof(typ, memb)
Definition: misc.h:29