Motr  M0
cookie_xc.c
Go to the documentation of this file.
1 /* This file is automatically generated from ha/cookie.h */
2 
3 #include "lib/misc.h" /* offsetof */
4 #include "lib/assert.h"
5 #include "xcode/xcode.h"
6 
7 #include "ha/cookie.h"
8 #include "ha/cookie_xc.h"
9 
11 
12 static struct _m0_ha_cookie_xc_s {
15 } _m0_ha_cookie_xc = {
16  ._type = {
18  .xct_name = "m0_ha_cookie_xc",
19  .xct_sizeof = sizeof (struct m0_ha_cookie_xc),
20  .xct_nr = 4,
21  .xct_flags = M0_XCODE_TYPE_FLAG_DOM_RPC,
22  }
23 };
24 
26 M0_BASSERT(offsetof(struct _m0_ha_cookie_xc_s, _child[0]) ==
27  offsetof(struct m0_xcode_type, xct_child[0]));
28 
29 
30 M0_BASSERT(sizeof(struct m0_ha_cookie_xc) == 40U);
31 
32 M0_BASSERT(sizeof ((struct m0_ha_cookie_xc *)0)->hcx_pid == 8U);
34 M0_BASSERT(sizeof ((struct m0_ha_cookie_xc *)0)->hcx_time_start == 8U);
36 M0_BASSERT(sizeof ((struct m0_ha_cookie_xc *)0)->hcx_uptime == 8U);
38 M0_BASSERT(sizeof ((struct m0_ha_cookie_xc *)0)->hcx_uuid == 16U);
40 
41 
42 
43 M0_INTERNAL void m0_xc_m0_ha_cookie_xc_struct_init(void)
44 {
45  _m0_ha_cookie_xc._child[0] = (struct m0_xcode_field) {
46  .xf_name = "hcx_pid",
47 
48  .xf_type = &M0_XT_U64,
49 
50  .xf_tag = 0,
51  .xf_opaque = NULL,
52  .xf_offset = offsetof(struct m0_ha_cookie_xc, hcx_pid),
53  .xf_read = NULL,
54  .xf_decor = {
56  }
57  };
59 
60  _m0_ha_cookie_xc._child[1] = (struct m0_xcode_field) {
61  .xf_name = "hcx_time_start",
62 
63  .xf_type = &M0_XT_U64,
64 
65  .xf_tag = 0,
66  .xf_opaque = NULL,
67  .xf_offset = offsetof(struct m0_ha_cookie_xc, hcx_time_start),
68  .xf_read = NULL,
69  .xf_decor = {
71  }
72  };
74 
75  _m0_ha_cookie_xc._child[2] = (struct m0_xcode_field) {
76  .xf_name = "hcx_uptime",
77 
78  .xf_type = &M0_XT_U64,
79 
80  .xf_tag = 0,
81  .xf_opaque = NULL,
82  .xf_offset = offsetof(struct m0_ha_cookie_xc, hcx_uptime),
83  .xf_read = NULL,
84  .xf_decor = {
86  }
87  };
89 
90  _m0_ha_cookie_xc._child[3] = (struct m0_xcode_field) {
91  .xf_name = "hcx_uuid",
92 
93  .xf_type = m0_uint128_xc,
94 
95  .xf_tag = 0,
96  .xf_opaque = NULL,
97  .xf_offset = offsetof(struct m0_ha_cookie_xc, hcx_uuid),
98  .xf_read = NULL,
99  .xf_decor = {
101  }
102  };
104 
106 }
107 
108 M0_INTERNAL void m0_xc_ha_cookie_init(void)
109 {
111 }
112 
113 M0_INTERNAL void m0_xc_ha_cookie_fini(void)
114 {
115 }
#define NULL
Definition: misc.h:38
M0_INTERNAL void m0_xc_ha_cookie_init(void)
Definition: cookie_xc.c:108
struct m0_xcode_type * m0_uint128_xc
Definition: types_xc.c:10
struct m0_xcode_field xct_child[0]
Definition: xcode.h:345
M0_INTERNAL void m0_xc_m0_uint128_struct_init(void)
Definition: types_xc.c:39
uint64_t hcx_pid
Definition: cookie.h:102
struct m0_uint128 hcx_uuid
Definition: cookie.h:105
uint64_t hcx_time_start
Definition: cookie.h:103
M0_INTERNAL void m0_xc_ha_cookie_fini(void)
Definition: cookie_xc.c:113
M0_INTERNAL void m0_xc_m0_ha_cookie_xc_struct_init(void)
Definition: cookie_xc.c:43
struct m0_xcode_type * m0_ha_cookie_xc_xc
Definition: cookie_xc.c:10
#define M0_POST(cond)
uint64_t hcx_uptime
Definition: cookie.h:104
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_BASSERT(offsetof(struct _m0_ha_cookie_xc_s, _child[0])==offsetof(struct m0_xcode_type, xct_child[0]))
const char * xf_name
Definition: xcode.h:251
const struct m0_xcode_type M0_XT_U64
Definition: xcode.c:940
static struct _m0_ha_cookie_xc_s _m0_ha_cookie_xc
#define offsetof(typ, memb)
Definition: misc.h:29