From 4cb96b974265f97a9902b4458e50d01082572a16 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Wed, 17 May 2023 14:46:49 +0200 Subject: monitor: add more *_locked() functions Allow flushing and printing to the monitor while mon->mon_lock is held. This will help cleaning up the locking of mon->mux_out and mon->suspend_cnt. Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- include/monitor/monitor.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/monitor') diff --git a/include/monitor/monitor.h b/include/monitor/monitor.h index 033390f..965f5d5 100644 --- a/include/monitor/monitor.h +++ b/include/monitor/monitor.h @@ -40,6 +40,9 @@ void monitor_flush(Monitor *mon); int monitor_set_cpu(Monitor *mon, int cpu_index); int monitor_get_cpu_index(Monitor *mon); +int monitor_puts_locked(Monitor *mon, const char *str); +void monitor_flush_locked(Monitor *mon); + void *gpa2hva(MemoryRegion **p_mr, hwaddr addr, uint64_t size, Error **errp); void monitor_read_command(MonitorHMP *mon, int show_prompt); -- cgit v1.1