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:
@@ -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.
|
||||
|
Reference in New Issue
Block a user