}
/* call */
- op = copy_call(&begin_op, op, cb->f.vcpu_udata, cb_idx);
+ op = copy_call(&begin_op, op, cb->regular.f.vcpu_udata, cb_idx);
return op;
}
if (type == PLUGIN_GEN_CB_MEM) {
/* call */
- op = copy_call(&begin_op, op, cb->f.vcpu_udata, cb_idx);
+ op = copy_call(&begin_op, op, cb->regular.f.vcpu_udata, cb_idx);
}
return op;
* instance of a callback to be called upon the execution of a particular TB.
*/
struct qemu_plugin_dyn_cb {
- union qemu_plugin_cb_sig f;
void *userp;
enum plugin_dyn_cb_subtype type;
/* @rw applies to mem callbacks only (both regular and inline) */
enum qemu_plugin_mem_rw rw;
/* fields specific to each dyn_cb type go here */
union {
+ struct {
+ union qemu_plugin_cb_sig f;
+ } regular;
struct {
qemu_plugin_u64 entry;
enum qemu_plugin_op op;
dyn_cb->userp = udata;
/* Note flags are discarded as unused. */
- dyn_cb->f.vcpu_udata = cb;
+ dyn_cb->regular.f.vcpu_udata = cb;
dyn_cb->type = PLUGIN_CB_REGULAR;
}
/* Note flags are discarded as unused. */
dyn_cb->type = PLUGIN_CB_REGULAR;
dyn_cb->rw = rw;
- dyn_cb->f.generic = cb;
+ dyn_cb->regular.f.vcpu_mem = cb;
}
/*
}
switch (cb->type) {
case PLUGIN_CB_REGULAR:
- cb->f.vcpu_mem(cpu->cpu_index, make_plugin_meminfo(oi, rw),
- vaddr, cb->userp);
+ cb->regular.f.vcpu_mem(cpu->cpu_index, make_plugin_meminfo(oi, rw),
+ vaddr, cb->userp);
break;
case PLUGIN_CB_INLINE:
exec_inline_op(cb, cpu->cpu_index);