mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-28 21:03:54 -06:00
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>
This commit is contained in:
parent
fe8bf5f629
commit
708b6a643c
4 changed files with 39 additions and 9 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue