From 708b6a643c7a974ffadf64e00019bdcd60edf6e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20Benn=C3=A9e?= Date: Fri, 22 Jun 2018 17:09:10 +0100 Subject: linux-user: introduce preexit_cleanup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit To avoid repeating ourselves move our preexit clean-up code into a helper function. I figured the continuing effort to split of the syscalls made it worthwhile creating a new file for it now. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Daniel P. Berrangé Reviewed-by: Laurent Vivier --- linux-user/qemu.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'linux-user/qemu.h') diff --git a/linux-user/qemu.h b/linux-user/qemu.h index 793cd4d..bb85c81 100644 --- a/linux-user/qemu.h +++ b/linux-user/qemu.h @@ -623,6 +623,14 @@ static inline int is_error(abi_long ret) return (abi_ulong)ret >= (abi_ulong)(-4096); } +/** + * preexit_cleanup: housekeeping before the guest exits + * + * env: the CPU state + * code: the exit code + */ +void preexit_cleanup(CPUArchState *env, int code); + /* Include target-specific struct and function definitions; * they may need access to the target-independent structures * above, so include them last. -- cgit v1.1