]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
system/runstate: Document qemu_add_vm_change_state_handler()
authorPhilippe Mathieu-Daudé <philmd@linaro.org>
Tue, 17 Jun 2025 04:44:18 +0000 (06:44 +0200)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Tue, 15 Jul 2025 19:42:58 +0000 (21:42 +0200)
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Message-Id: <20250703173248.44995-4-philmd@linaro.org>

include/system/runstate.h

index fdd5c4a5172310543cfe8caad77e58d1135cd447..b6e8d6beab741d082a9331f16af014c005116f7b 100644 (file)
@@ -14,6 +14,16 @@ void runstate_replay_enable(void);
 typedef void VMChangeStateHandler(void *opaque, bool running, RunState state);
 typedef int VMChangeStateHandlerWithRet(void *opaque, bool running, RunState state);
 
+/**
+ * qemu_add_vm_change_state_handler:
+ * @cb: the callback to invoke
+ * @opaque: user data passed to the callback
+ *
+ * Register a callback function that is invoked when the vm starts or stops
+ * running.
+ *
+ * Returns: an entry to be freed using qemu_del_vm_change_state_handler()
+ */
 VMChangeStateEntry *qemu_add_vm_change_state_handler(VMChangeStateHandler *cb,
                                                      void *opaque);
 VMChangeStateEntry *qemu_add_vm_change_state_handler_prio(