summaryrefslogtreecommitdiffstats
path: root/semihosting/console.c
diff options
context:
space:
mode:
Diffstat (limited to 'semihosting/console.c')
-rw-r--r--semihosting/console.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/semihosting/console.c b/semihosting/console.c
index 4e49202b2a..17ece6bdca 100644
--- a/semihosting/console.c
+++ b/semihosting/console.c
@@ -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);