}, \
.nr_callbacks = 0, \
.enabled = 0, \
- .callbacks = &side_empty_callback, \
+ .callbacks = (const struct side_callback *) &side_empty_callback[0], \
.desc = &(_identifier), \
}; \
_linkage struct side_event_description __attribute__((section("side_event_description"))) \
extern "C" {
#endif
-struct side_callback {
- union {
- void (*call)(const struct side_event_description *desc,
- const struct side_arg_vec *side_arg_vec,
- void *priv);
- void (*call_variadic)(const struct side_event_description *desc,
- const struct side_arg_vec *side_arg_vec,
- const struct side_arg_dynamic_struct *var_struct,
- void *priv);
- } u;
- void *priv;
-};
+struct side_callback;
-extern const struct side_callback side_empty_callback;
+extern const char side_empty_callback[];
void side_call(const struct side_event_state *state,
const struct side_arg_vec *side_arg_vec);
void *priv;
};
+struct side_callback {
+ union {
+ void (*call)(const struct side_event_description *desc,
+ const struct side_arg_vec *side_arg_vec,
+ void *priv);
+ void (*call_variadic)(const struct side_event_description *desc,
+ const struct side_arg_vec *side_arg_vec,
+ const struct side_arg_dynamic_struct *var_struct,
+ void *priv);
+ } u;
+ void *priv;
+};
+
static struct side_rcu_gp_state rcu_gp;
/*
* The empty callback has a NULL function callback pointer, which stops
* iteration on the array of callbacks immediately.
*/
-const struct side_callback side_empty_callback = { };
+const char side_empty_callback[sizeof(struct side_callback)];
void side_call(const struct side_event_state *event_state, const struct side_arg_vec *side_arg_vec)
{