Drop the vm_running global variable

Use runstate_is_running() instead, which is introduced by this commit.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
This commit is contained in:
Luiz Capitulino 2011-07-29 15:36:43 -03:00
parent 1bcef683bf
commit 1354869c38
14 changed files with 29 additions and 27 deletions

View file

@ -2534,7 +2534,7 @@ static void gdb_read_byte(GDBState *s, int ch)
if (ch != '$')
return;
}
if (vm_running) {
if (runstate_is_running()) {
/* when the CPU is running, we cannot do anything except stop
it when receiving a char */
vm_stop(RSTATE_PAUSED);
@ -2839,7 +2839,7 @@ static int gdb_monitor_write(CharDriverState *chr, const uint8_t *buf, int len)
#ifndef _WIN32
static void gdb_sigterm_handler(int signal)
{
if (vm_running) {
if (runstate_is_running()) {
vm_stop(RSTATE_PAUSED);
}
}