* The semihosting API has no concept of its errno being thread-safe,
* as the API design predates SMP CPUs and was intended as a simple
* real-hardware set of debug functionality. For QEMU, we make the
- * errno be per-thread in linux-user mode; in softmmu it is a simple
+ * errno be per-thread in linux-user mode; in system-mode it is a simple
* global, and we assume that the guest takes care of avoiding any races.
*/
#ifndef CONFIG_USER_ONLY
static target_ulong syscall_err;
-#include "semihosting/softmmu-uaccess.h"
+#include "semihosting/uaccess.h"
#endif
static inline uint32_t get_swi_errno(CPUState *cs)
target_ulong ul_ret;
char * s;
int nr;
- uint32_t ret;
int64_t elapsed;
nr = common_semi_arg(cs, 0) & 0xffffffffU;
case TARGET_SYS_EXIT:
case TARGET_SYS_EXIT_EXTENDED:
+ {
+ uint32_t ret;
+
if (common_semi_sys_exit_extended(cs, nr)) {
/*
* The A64 version of SYS_EXIT takes a parameter block,
}
gdb_exit(ret);
exit(ret);
+ }
case TARGET_SYS_ELAPSED:
elapsed = get_clock() - clock_start;