diff options
author | Luiz Capitulino <lcapitulino@redhat.com> | 2011-07-29 15:36:43 -0300 |
---|---|---|
committer | Luiz Capitulino <lcapitulino@redhat.com> | 2011-09-15 16:39:32 -0300 |
commit | 1354869c380cf4560fa3f0520e914cb5ee380ac8 (patch) | |
tree | da76e4d2063b81905a66a8446d9301bd910ee856 /vl.c | |
parent | 1bcef683bf840a928d633755031ac572d5fdb851 (diff) |
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>
Diffstat (limited to 'vl.c')
-rw-r--r-- | vl.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -185,7 +185,6 @@ int mem_prealloc = 0; /* force preallocation of physical target memory */ #endif int nb_nics; NICInfo nd_table[MAX_NICS]; -int vm_running; int autostart; static int rtc_utc = 1; static int rtc_date_offset = -1; /* -1 means no change */ @@ -407,6 +406,11 @@ void runstate_set(RunState new_state) current_run_state = new_state; } +int runstate_is_running(void) +{ + return runstate_check(RSTATE_RUNNING); +} + /***********************************************************/ /* real time host monotonic timer */ @@ -1243,9 +1247,8 @@ void vm_state_notify(int running, RunState state) void vm_start(void) { - if (!vm_running) { + if (!runstate_is_running()) { cpu_enable_ticks(); - vm_running = 1; runstate_set(RSTATE_RUNNING); vm_state_notify(1, RSTATE_RUNNING); resume_all_vcpus(); |