summaryrefslogtreecommitdiff
path: root/linux-user/qemu.h
diff options
context:
space:
mode:
authorAlex Bennée <alex.bennee@linaro.org>2018-06-22 17:09:10 +0100
committerAlex Bennée <alex.bennee@linaro.org>2018-07-05 15:59:41 +0100
commit708b6a643c7a974ffadf64e00019bdcd60edf6e5 (patch)
treed731b8484b605bb19dcdf47f6eb85cdee0794bf2 /linux-user/qemu.h
parentfe8bf5f62972ce9f227ae3e25767116a6d221b6d (diff)
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.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/linux-user/qemu.h b/linux-user/qemu.h
index 793cd4df04..bb85c81aa4 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.