mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-26 20:03:54 -06:00
semihosting: Pass CPUState to qemu_semihosting_console_inc
We don't need CPUArchState, and we do want the CPUState of the thread performing the operation -- use this instead of current_cpu. Reviewed-by: Luc Michel <lmichel@kalray.eu> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
675f702fd7
commit
3367d452b0
4 changed files with 10 additions and 10 deletions
|
@ -144,17 +144,17 @@ static void console_read(void *opaque, const uint8_t *buf, int size)
|
|||
c->sleeping_cpus = NULL;
|
||||
}
|
||||
|
||||
target_ulong qemu_semihosting_console_inc(CPUArchState *env)
|
||||
target_ulong qemu_semihosting_console_inc(CPUState *cs)
|
||||
{
|
||||
uint8_t ch;
|
||||
SemihostingConsole *c = &console;
|
||||
|
||||
g_assert(qemu_mutex_iothread_locked());
|
||||
g_assert(current_cpu);
|
||||
if (fifo8_is_empty(&c->fifo)) {
|
||||
c->sleeping_cpus = g_slist_prepend(c->sleeping_cpus, current_cpu);
|
||||
current_cpu->halted = 1;
|
||||
current_cpu->exception_index = EXCP_HALTED;
|
||||
cpu_loop_exit(current_cpu);
|
||||
c->sleeping_cpus = g_slist_prepend(c->sleeping_cpus, cs);
|
||||
cs->halted = 1;
|
||||
cs->exception_index = EXCP_HALTED;
|
||||
cpu_loop_exit(cs);
|
||||
/* never returns */
|
||||
}
|
||||
ch = fifo8_pop(&c->fifo);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue