From aff56de576c949880d674d37b82bdc97841107fb Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Thu, 14 Mar 2024 14:09:33 -1000 Subject: plugins: Move function pointer in qemu_plugin_dyn_cb MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The out-of-line function pointer is mutually exclusive with inline expansion, so move it into the union. Wrap the pointer in a structure named 'regular' to match PLUGIN_CB_REGULAR. Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- include/qemu/plugin.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include/qemu/plugin.h') diff --git a/include/qemu/plugin.h b/include/qemu/plugin.h index 41db748eda..5676ab5ef2 100644 --- a/include/qemu/plugin.h +++ b/include/qemu/plugin.h @@ -85,13 +85,15 @@ enum plugin_dyn_cb_subtype { * 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; -- cgit 1.4.1