diff options
author | Alex Bennée <alex.bennee@linaro.org> | 2018-06-22 17:09:10 +0100 |
---|---|---|
committer | Alex Bennée <alex.bennee@linaro.org> | 2018-07-05 15:59:41 +0100 |
commit | 708b6a643c7a974ffadf64e00019bdcd60edf6e5 (patch) | |
tree | d731b8484b605bb19dcdf47f6eb85cdee0794bf2 /linux-user/qemu.h | |
parent | fe8bf5f62972ce9f227ae3e25767116a6d221b6d (diff) | |
download | qemu-708b6a643c7a974ffadf64e00019bdcd60edf6e5.zip qemu-708b6a643c7a974ffadf64e00019bdcd60edf6e5.tar.gz qemu-708b6a643c7a974ffadf64e00019bdcd60edf6e5.tar.bz2 |
linux-user: introduce preexit_cleanup
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 <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'linux-user/qemu.h')
-rw-r--r-- | linux-user/qemu.h | 8 |
1 files changed, 8 insertions, 0 deletions
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. |