Motr  M0
fsync_fops_xc.c
Go to the documentation of this file.
1 /* This file is automatically generated from mdservice/fsync_fops.h */
2 
3 #include "lib/misc.h" /* offsetof */
4 #include "lib/assert.h"
5 #include "xcode/xcode.h"
6 
7 #include "mdservice/fsync_fops.h"
9 
12 
13 static struct _m0_fop_fsync_s {
16 } _m0_fop_fsync = {
17  ._type = {
19  .xct_name = "m0_fop_fsync",
20  .xct_sizeof = sizeof (struct m0_fop_fsync),
21  .xct_nr = 2,
22  .xct_flags = M0_XCODE_TYPE_FLAG_DOM_RPC,
23  }
24 };
25 
27 M0_BASSERT(offsetof(struct _m0_fop_fsync_s, _child[0]) ==
28  offsetof(struct m0_xcode_type, xct_child[0]));
29 
30 static struct _m0_fop_fsync_rep_s {
34  ._type = {
36  .xct_name = "m0_fop_fsync_rep",
37  .xct_sizeof = sizeof (struct m0_fop_fsync_rep),
38  .xct_nr = 2,
39  .xct_flags = M0_XCODE_TYPE_FLAG_DOM_RPC,
40  }
41 };
42 
44 M0_BASSERT(offsetof(struct _m0_fop_fsync_rep_s, _child[0]) ==
45  offsetof(struct m0_xcode_type, xct_child[0]));
46 
47 
48 M0_BASSERT(sizeof(struct m0_fop_fsync) == 24U);
49 
50 M0_BASSERT(sizeof ((struct m0_fop_fsync *)0)->ff_be_remid == 16U);
52 M0_BASSERT(sizeof ((struct m0_fop_fsync *)0)->ff_fsync_mode == 4U);
54 
55 M0_BASSERT(sizeof(struct m0_fop_fsync_rep) == 24U);
56 
57 M0_BASSERT(sizeof ((struct m0_fop_fsync_rep *)0)->ffr_rc == 4U);
59 M0_BASSERT(sizeof ((struct m0_fop_fsync_rep *)0)->ffr_be_remid == 16U);
61 
62 
63 
64 M0_INTERNAL void m0_xc_m0_fop_fsync_struct_init(void)
65 {
66  _m0_fop_fsync._child[0] = (struct m0_xcode_field) {
67  .xf_name = "ff_be_remid",
68 
69  .xf_type = m0_be_tx_remid_xc,
70 
71  .xf_tag = 0,
72  .xf_opaque = NULL,
73  .xf_offset = offsetof(struct m0_fop_fsync, ff_be_remid),
74  .xf_read = NULL,
75  .xf_decor = {
77  }
78  };
80 
81  _m0_fop_fsync._child[1] = (struct m0_xcode_field) {
82  .xf_name = "ff_fsync_mode",
83 
84  .xf_type = &M0_XT_U32,
85 
86  .xf_tag = 0,
87  .xf_opaque = NULL,
88  .xf_offset = offsetof(struct m0_fop_fsync, ff_fsync_mode),
89  .xf_read = NULL,
90  .xf_decor = {
92  }
93  };
95 
97 }
98 
99 M0_INTERNAL void m0_xc_m0_fop_fsync_rep_struct_init(void)
100 {
101  _m0_fop_fsync_rep._child[0] = (struct m0_xcode_field) {
102  .xf_name = "ffr_rc",
103 
104  .xf_type = &M0_XT_U32,
105 
106  .xf_tag = 0,
107  .xf_opaque = NULL,
108  .xf_offset = offsetof(struct m0_fop_fsync_rep, ffr_rc),
109  .xf_read = NULL,
110  .xf_decor = {
112  }
113  };
114  m0_xc_u32_init();
115 
116  _m0_fop_fsync_rep._child[1] = (struct m0_xcode_field) {
117  .xf_name = "ffr_be_remid",
118 
119  .xf_type = m0_be_tx_remid_xc,
120 
121  .xf_tag = 0,
122  .xf_opaque = NULL,
123  .xf_offset = offsetof(struct m0_fop_fsync_rep, ffr_be_remid),
124  .xf_read = NULL,
125  .xf_decor = {
127  }
128  };
130 
132 }
133 
134 M0_INTERNAL void m0_xc_mdservice_fsync_fops_init(void)
135 {
138 }
139 
140 M0_INTERNAL void m0_xc_mdservice_fsync_fops_fini(void)
141 {
142 }
int32_t ffr_rc
Definition: fsync_fops.h:115
#define NULL
Definition: misc.h:38
struct m0_xcode_type _type
Definition: fsync_fops_xc.c:31
M0_INTERNAL void m0_xc_mdservice_fsync_fops_fini(void)
M0_INTERNAL void m0_xc_mdservice_fsync_fops_init(void)
struct m0_xcode_field xct_child[0]
Definition: xcode.h:345
static struct _m0_fop_fsync_rep_s _m0_fop_fsync_rep
struct m0_xcode_type * m0_fop_fsync_rep_xc
Definition: fsync_fops_xc.c:11
uint32_t ff_fsync_mode
Definition: fsync_fops.h:118
struct m0_xcode_type * m0_be_tx_remid_xc
Definition: wire_xc.c:13
M0_INTERNAL void m0_xc_m0_be_tx_remid_struct_init(void)
Definition: wire_xc.c:280
struct m0_xcode_field _child[2]
Definition: fsync_fops_xc.c:32
struct m0_be_tx_remid ffr_be_remid
Definition: fsync_fops.h:121
static struct _m0_fop_fsync_s _m0_fop_fsync
struct m0_xcode_field _child[2]
Definition: fsync_fops_xc.c:15
#define M0_POST(cond)
bool m0_xcode_type_invariant(const struct m0_xcode_type *xt)
Definition: xcode.c:74
M0_INTERNAL void m0_xc_m0_fop_fsync_struct_init(void)
Definition: fsync_fops_xc.c:64
struct m0_be_tx_remid ff_be_remid
Definition: fsync_fops.h:115
M0_BASSERT(offsetof(struct _m0_fop_fsync_s, _child[0])==offsetof(struct m0_xcode_type, xct_child[0]))
struct m0_xcode_type _type
Definition: fsync_fops_xc.c:14
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_type * m0_fop_fsync_xc
Definition: fsync_fops_xc.c:10
void m0_xc_u32_init(void)
Definition: xcode.c:900
M0_INTERNAL void m0_xc_m0_fop_fsync_rep_struct_init(void)
Definition: fsync_fops_xc.c:99
const char * xf_name
Definition: xcode.h:251
#define offsetof(typ, memb)
Definition: misc.h:29