diff options
author | Peter Xu <peterx@redhat.com> | 2018-03-09 16:59:50 +0800 |
---|---|---|
committer | Eric Blake <eblake@redhat.com> | 2018-03-19 14:58:36 -0500 |
commit | 6adf08dd42929542426b055a4b66a5bc0b8e20ba (patch) | |
tree | ee702a801d4f4ac7066994fe8d8f33354dda32c7 /exec.c | |
parent | 227a07552f3aff3cefe7eb9f8993c04a420ed962 (diff) | |
download | qemu-6adf08dd42929542426b055a4b66a5bc0b8e20ba.zip qemu-6adf08dd42929542426b055a4b66a5bc0b8e20ba.tar.gz qemu-6adf08dd42929542426b055a4b66a5bc0b8e20ba.tar.bz2 |
monitor: unify global init
There are many places where the monitor initializes its globals:
- monitor_init_qmp_commands() at the very beginning
- single function to init monitor_lock
- in the first entry of monitor_init() using "is_first_init"
Unify them a bit.
monitor_lock is not used before monitor_init() (as confirmed by code
analysis and gdb watchpoints); so we are safe delaying what was a
constructor-time initialization of the mutex into the later first call
to monitor_init().
Reviewed-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
Message-Id: <20180309090006.10018-8-peterx@redhat.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'exec.c')
0 files changed, 0 insertions, 0 deletions