Motr  M0
ha_xc.c
Go to the documentation of this file.
1 /* This file is automatically generated from conf/ha.h */
2 
3 #include "lib/misc.h" /* offsetof */
4 #include "lib/assert.h"
5 #include "xcode/xcode.h"
6 
7 #include "conf/ha.h"
8 #include "conf/ha_xc.h"
9 
12 
13 static struct _m0_conf_ha_process_s {
17  ._type = {
19  .xct_name = "m0_conf_ha_process",
20  .xct_sizeof = sizeof (struct m0_conf_ha_process),
21  .xct_nr = 3,
22  .xct_flags = M0_XCODE_TYPE_FLAG_DOM_RPC,
23  }
24 };
25 
27 M0_BASSERT(offsetof(struct _m0_conf_ha_process_s, _child[0]) ==
28  offsetof(struct m0_xcode_type, xct_child[0]));
29 
30 static struct _m0_conf_ha_service_s {
34  ._type = {
36  .xct_name = "m0_conf_ha_service",
37  .xct_sizeof = sizeof (struct m0_conf_ha_service),
38  .xct_nr = 3,
39  .xct_flags = M0_XCODE_TYPE_FLAG_DOM_RPC,
40  }
41 };
42 
44 M0_BASSERT(offsetof(struct _m0_conf_ha_service_s, _child[0]) ==
45  offsetof(struct m0_xcode_type, xct_child[0]));
46 
47 
48 M0_BASSERT(sizeof(struct m0_conf_ha_process) == 24U);
49 
50 M0_BASSERT(sizeof ((struct m0_conf_ha_process *)0)->chp_event == 8U);
52 M0_BASSERT(sizeof ((struct m0_conf_ha_process *)0)->chp_type == 8U);
54 M0_BASSERT(sizeof ((struct m0_conf_ha_process *)0)->chp_pid == 8U);
56 
57 M0_BASSERT(sizeof(struct m0_conf_ha_service) == 24U);
58 
59 M0_BASSERT(sizeof ((struct m0_conf_ha_service *)0)->chs_event == 8U);
61 M0_BASSERT(sizeof ((struct m0_conf_ha_service *)0)->chs_type == 8U);
63 M0_BASSERT(sizeof ((struct m0_conf_ha_service *)0)->chs_pid == 8U);
65 
66 
67 
69 {
71  .xf_name = "chp_event",
72 
73  .xf_type = &M0_XT_U64,
74 
75  .xf_tag = 0,
76  .xf_opaque = NULL,
77  .xf_offset = offsetof(struct m0_conf_ha_process, chp_event),
78  .xf_read = NULL,
79  .xf_decor = {
81  }
82  };
84 
86  .xf_name = "chp_type",
87 
88  .xf_type = &M0_XT_U64,
89 
90  .xf_tag = 0,
91  .xf_opaque = NULL,
92  .xf_offset = offsetof(struct m0_conf_ha_process, chp_type),
93  .xf_read = NULL,
94  .xf_decor = {
96  }
97  };
99 
101  .xf_name = "chp_pid",
102 
103  .xf_type = &M0_XT_U64,
104 
105  .xf_tag = 0,
106  .xf_opaque = NULL,
107  .xf_offset = offsetof(struct m0_conf_ha_process, chp_pid),
108  .xf_read = NULL,
109  .xf_decor = {
111  }
112  };
113  m0_xc_u64_init();
114 
116 }
117 
119 {
121  .xf_name = "chs_event",
122 
123  .xf_type = &M0_XT_U64,
124 
125  .xf_tag = 0,
126  .xf_opaque = NULL,
127  .xf_offset = offsetof(struct m0_conf_ha_service, chs_event),
128  .xf_read = NULL,
129  .xf_decor = {
131  }
132  };
133  m0_xc_u64_init();
134 
136  .xf_name = "chs_type",
137 
138  .xf_type = &M0_XT_U64,
139 
140  .xf_tag = 0,
141  .xf_opaque = NULL,
142  .xf_offset = offsetof(struct m0_conf_ha_service, chs_type),
143  .xf_read = NULL,
144  .xf_decor = {
146  }
147  };
148  m0_xc_u64_init();
149 
151  .xf_name = "chs_pid",
152 
153  .xf_type = &M0_XT_U64,
154 
155  .xf_tag = 0,
156  .xf_opaque = NULL,
157  .xf_offset = offsetof(struct m0_conf_ha_service, chs_pid),
158  .xf_read = NULL,
159  .xf_decor = {
161  }
162  };
163  m0_xc_u64_init();
164 
166 }
167 
168 M0_INTERNAL void m0_xc_conf_ha_init(void)
169 {
172 }
173 
174 M0_INTERNAL void m0_xc_conf_ha_fini(void)
175 {
176 }
uint64_t chp_event
Definition: ha.h:82
#define NULL
Definition: misc.h:38
struct m0_xcode_type _type
Definition: ha_xc.c:31
struct m0_xcode_field xct_child[0]
Definition: xcode.h:345
static struct _m0_conf_ha_process_s _m0_conf_ha_process
M0_INTERNAL void m0_xc_m0_conf_ha_process_struct_init(void)
Definition: ha_xc.c:68
struct m0_xcode_field _child[3]
Definition: ha_xc.c:32
M0_BASSERT(offsetof(struct _m0_be_io_err_s, _child[0])==offsetof(struct m0_xcode_type, xct_child[0]))
uint64_t chs_event
Definition: ha.h:82
struct m0_xcode_field _child[3]
Definition: ha_xc.c:15
#define M0_POST(cond)
bool m0_xcode_type_invariant(const struct m0_xcode_type *xt)
Definition: xcode.c:74
struct m0_xcode_type _type
Definition: ha_xc.c:14
M0_INTERNAL void m0_xc_conf_ha_fini(void)
Definition: ha_xc.c:174
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_conf_ha_init(void)
Definition: ha_xc.c:168
uint64_t chs_type
Definition: ha.h:84
M0_INTERNAL void m0_xc_m0_conf_ha_service_struct_init(void)
Definition: ha_xc.c:118
struct m0_xcode_type * m0_conf_ha_process_xc
Definition: ha_xc.c:10
uint64_t chp_pid
Definition: ha.h:90
const char * xf_name
Definition: xcode.h:251
uint64_t chs_pid
Definition: ha.h:90
static struct _m0_conf_ha_service_s _m0_conf_ha_service
const struct m0_xcode_type M0_XT_U64
Definition: xcode.c:940
#define offsetof(typ, memb)
Definition: misc.h:29
uint64_t chp_type
Definition: ha.h:84
struct m0_xcode_type * m0_conf_ha_service_xc
Definition: ha_xc.c:11