diff mbox

[RFC,v2,02/11] cpus: make all_vcpus_paused() return bool

Message ID 1459870344-16773-3-git-send-email-alex.bennee@linaro.org
State New
Headers show

Commit Message

Alex Bennée April 5, 2016, 3:32 p.m. UTC
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 cpus.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Sergey Fedorov April 11, 2016, 12:48 p.m. UTC | #1
On 05/04/16 18:32, Alex Bennée wrote:
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>

Reviewed-by: Sergey Fedorov <sergey.fedorov@linaro.org>

> ---
>  cpus.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/cpus.c b/cpus.c
> index 8ae4777..e118fdf 100644
> --- a/cpus.c
> +++ b/cpus.c
> @@ -1248,17 +1248,17 @@ void qemu_mutex_unlock_iothread(void)
>      qemu_mutex_unlock(&qemu_global_mutex);
>  }
>  
> -static int all_vcpus_paused(void)
> +static bool all_vcpus_paused(void)
>  {
>      CPUState *cpu;
>  
>      CPU_FOREACH(cpu) {
>          if (!cpu->stopped) {
> -            return 0;
> +            return false;
>          }
>      }
>  
> -    return 1;
> +    return true;
>  }
>  
>  void pause_all_vcpus(void)
diff mbox

Patch

diff --git a/cpus.c b/cpus.c
index 8ae4777..e118fdf 100644
--- a/cpus.c
+++ b/cpus.c
@@ -1248,17 +1248,17 @@  void qemu_mutex_unlock_iothread(void)
     qemu_mutex_unlock(&qemu_global_mutex);
 }
 
-static int all_vcpus_paused(void)
+static bool all_vcpus_paused(void)
 {
     CPUState *cpu;
 
     CPU_FOREACH(cpu) {
         if (!cpu->stopped) {
-            return 0;
+            return false;
         }
     }
 
-    return 1;
+    return true;
 }
 
 void pause_all_vcpus(void)