diff options
author | Philippe Mathieu-Daudé <philmd@linaro.org> | 2025-06-17 06:44:18 +0200 |
---|---|---|
committer | Philippe Mathieu-Daudé <philmd@linaro.org> | 2025-07-15 21:42:58 +0200 |
commit | 5a67e43096484ba11470b5b9aea5d78e32fded63 (patch) | |
tree | 80f1f8761e5b5dc2519a60136cb5532bb91aaaa4 | |
parent | ec5c2e7f38ee05c3edc81f2d0873141e4d8d074e (diff) | |
download | qemu-5a67e43096484ba11470b5b9aea5d78e32fded63.zip qemu-5a67e43096484ba11470b5b9aea5d78e32fded63.tar.gz qemu-5a67e43096484ba11470b5b9aea5d78e32fded63.tar.bz2 |
system/runstate: Document qemu_add_vm_change_state_handler()
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>
-rw-r--r-- | include/system/runstate.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/system/runstate.h b/include/system/runstate.h index fdd5c4a..b6e8d6b 100644 --- a/include/system/runstate.h +++ b/include/system/runstate.h @@ -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( |