mirror of
https://gitlab.com/qemu-project/qemu
synced 2024-11-05 20:35:44 +00:00
monitor: use QEMU_LOCK_GUARD a bit more
Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
690705ca0b
commit
e37548ef13
1 changed files with 2 additions and 4 deletions
|
@ -161,10 +161,9 @@ static gboolean monitor_unblocked(void *do_not_use, GIOCondition cond,
|
|||
{
|
||||
Monitor *mon = opaque;
|
||||
|
||||
qemu_mutex_lock(&mon->mon_lock);
|
||||
QEMU_LOCK_GUARD(&mon->mon_lock);
|
||||
mon->out_watch = 0;
|
||||
monitor_flush_locked(mon);
|
||||
qemu_mutex_unlock(&mon->mon_lock);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -203,9 +202,8 @@ static void monitor_flush_locked(Monitor *mon)
|
|||
|
||||
void monitor_flush(Monitor *mon)
|
||||
{
|
||||
qemu_mutex_lock(&mon->mon_lock);
|
||||
QEMU_LOCK_GUARD(&mon->mon_lock);
|
||||
monitor_flush_locked(mon);
|
||||
qemu_mutex_unlock(&mon->mon_lock);
|
||||
}
|
||||
|
||||
/* flush at every end of line */
|
||||
|
|
Loading…
Reference in a new issue