]> git.proxmox.com Git - qemu.git/commitdiff
exec.h: fix coding style and change cpu_has_work to return bool
authorBlue Swirl <blauwirbel@gmail.com>
Sat, 21 May 2011 12:16:05 +0000 (12:16 +0000)
committerBlue Swirl <blauwirbel@gmail.com>
Sun, 26 Jun 2011 18:25:26 +0000 (18:25 +0000)
Before the next patch, fix coding style of the areas affected.

Change the type of the return value from cpu_has_work() and
qemu_cpu_has_work() to bool.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
15 files changed:
cpu-all.h
cpu-exec.c
target-alpha/exec.h
target-arm/exec.h
target-cris/exec.h
target-i386/exec.h
target-lm32/exec.h
target-m68k/exec.h
target-microblaze/exec.h
target-mips/exec.h
target-ppc/exec.h
target-s390x/exec.h
target-sh4/exec.h
target-sparc/exec.h
target-unicore32/exec.h

index 880f570d56101175b09ecfe41a16d7e705f87727..e8391009a36e4de3accd1ac2feb0a2ac28cb18de 100644 (file)
--- a/cpu-all.h
+++ b/cpu-all.h
@@ -847,7 +847,7 @@ void cpu_reset_interrupt(CPUState *env, int mask);
 
 void cpu_exit(CPUState *s);
 
-int qemu_cpu_has_work(CPUState *env);
+bool qemu_cpu_has_work(CPUState *env);
 
 /* Breakpoint/watchpoint flags */
 #define BP_MEM_READ           0x01
index ecd201ee730f212fc75a151995054e6ce213e953..49de9e0ad96bb0edfc3b6d9ced58357458bb3638 100644 (file)
@@ -32,7 +32,7 @@ int tb_invalidated_flag;
 
 //#define CONFIG_DEBUG_EXEC
 
-int qemu_cpu_has_work(CPUState *env)
+bool qemu_cpu_has_work(CPUState *env)
 {
     return cpu_has_work(env);
 }
index 7a325e7a759cd6db5a18fb81ca507eafc3bb4fd5..0f9b827015e8ffcb3ff8ca4593db4133951c8e9a 100644 (file)
@@ -37,7 +37,7 @@ register struct CPUAlphaState *env asm(AREG0);
 #include "softmmu_exec.h"
 #endif /* !defined(CONFIG_USER_ONLY) */
 
-static inline int cpu_has_work(CPUState *env)
+static inline bool cpu_has_work(CPUState *env)
 {
     /* Here we are checking to see if the CPU should wake up from HALT.
        We will have gotten into this state only for WTINT from PALmode.  */
index db6608ec8b2f8d7722159f77338ade0c3ce7920d..9c31418a14ef332bfe8068ce5798affd82ef6168 100644 (file)
@@ -24,10 +24,10 @@ register struct CPUARMState *env asm(AREG0);
 #include "cpu.h"
 #include "exec-all.h"
 
-static inline int cpu_has_work(CPUState *env)
+static inline bool cpu_has_work(CPUState *env)
 {
-    return (env->interrupt_request &
-            (CPU_INTERRUPT_FIQ | CPU_INTERRUPT_HARD | CPU_INTERRUPT_EXITTB));
+    return env->interrupt_request &
+        (CPU_INTERRUPT_FIQ | CPU_INTERRUPT_HARD | CPU_INTERRUPT_EXITTB);
 }
 
 #if !defined(CONFIG_USER_ONLY)
index 2d5d297e1b125be486bee07406e50e05c5c510ef..70d99d184fde63473055c24e6e0936b7cc339af1 100644 (file)
@@ -28,9 +28,9 @@ register struct CPUCRISState *env asm(AREG0);
 #include "softmmu_exec.h"
 #endif
 
-static inline int cpu_has_work(CPUState *env)
+static inline bool cpu_has_work(CPUState *env)
 {
-    return (env->interrupt_request & (CPU_INTERRUPT_HARD | CPU_INTERRUPT_NMI));
+    return env->interrupt_request & (CPU_INTERRUPT_HARD | CPU_INTERRUPT_NMI);
 }
 
 static inline void cpu_pc_from_tb(CPUState *env, TranslationBlock *tb)
index 5dbee96496b149790593537200f5bbe2e0b17ff7..77bb356d7def44bf39272eaa5b7036bc899cea16 100644 (file)
@@ -160,7 +160,7 @@ static inline void load_eflags(int eflags, int update_mask)
         (eflags & update_mask) | 0x2;
 }
 
-static inline int cpu_has_work(CPUState *env)
+static inline bool cpu_has_work(CPUState *env)
 {
     return ((env->interrupt_request & CPU_INTERRUPT_HARD) &&
             (env->eflags & IF_MASK)) ||
index 348b723f29e2821fdeaac5679604e99902b38e2e..83ddb6587f4afad23ec9220842c57a7b8e0b623e 100644 (file)
@@ -24,7 +24,7 @@ register struct CPULM32State *env asm(AREG0);
 #include "cpu.h"
 #include "exec-all.h"
 
-static inline int cpu_has_work(CPUState *env)
+static inline bool cpu_has_work(CPUState *env)
 {
     return env->interrupt_request & CPU_INTERRUPT_HARD;
 }
index 91daa6bac47c6ef31d1e6aca39254af31c27a6ca..f7abbf4d26a8bf8a37d7b1394df73c9798e3c707 100644 (file)
@@ -28,9 +28,9 @@ register struct CPUM68KState *env asm(AREG0);
 #include "softmmu_exec.h"
 #endif
 
-static inline int cpu_has_work(CPUState *env)
+static inline bool cpu_has_work(CPUState *env)
 {
-    return (env->interrupt_request & (CPU_INTERRUPT_HARD));
+    return env->interrupt_request & (CPU_INTERRUPT_HARD);
 }
 
 static inline void cpu_pc_from_tb(CPUState *env, TranslationBlock *tb)
index 1efff30620a769bb90b55ea1dcc9a4e2ba16d434..bb2b7db0b0662e9aace36049a8f4700364b014aa 100644 (file)
@@ -27,9 +27,9 @@ register struct CPUMBState *env asm(AREG0);
 #include "softmmu_exec.h"
 #endif
 
-static inline int cpu_has_work(CPUState *env)
+static inline bool cpu_has_work(CPUState *env)
 {
-    return (env->interrupt_request & (CPU_INTERRUPT_HARD | CPU_INTERRUPT_NMI));
+    return env->interrupt_request & (CPU_INTERRUPT_HARD | CPU_INTERRUPT_NMI);
 }
 
 static inline void cpu_pc_from_tb(CPUState *env, TranslationBlock *tb)
index 607edf12ca04197ffd41042640e6bc4b0215a1a9..e908c3f04b8684f1d401d2dacbb598ce022f8af4 100644 (file)
@@ -17,7 +17,7 @@ register struct CPUMIPSState *env asm(AREG0);
 #include "softmmu_exec.h"
 #endif /* !defined(CONFIG_USER_ONLY) */
 
-static inline int cpu_has_work(CPUState *env)
+static inline bool cpu_has_work(CPUState *env)
 {
     int has_work = 0;
 
index f87847acb1ba86b7ff46a9a69c111346d05249e5..81c3c547f8e821aad2e99595292abdd831929cb8 100644 (file)
@@ -32,9 +32,9 @@ register struct CPUPPCState *env asm(AREG0);
 #include "softmmu_exec.h"
 #endif /* !defined(CONFIG_USER_ONLY) */
 
-static inline int cpu_has_work(CPUState *env)
+static inline bool cpu_has_work(CPUState *env)
 {
-    return (msr_ee && (env->interrupt_request & CPU_INTERRUPT_HARD));
+    return msr_ee && (env->interrupt_request & CPU_INTERRUPT_HARD);
 }
 
 
index 7a87fffca6ddb0dcc8b10095dcf9875e9768d5e6..9ababe174fe19aab24ed6d6eb793394034af8380 100644 (file)
@@ -29,10 +29,10 @@ register struct CPUS390XState *env asm(AREG0);
 #include "softmmu_exec.h"
 #endif /* !defined(CONFIG_USER_ONLY) */
 
-static inline int cpu_has_work(CPUState *env)
+static inline bool cpu_has_work(CPUState *env)
 {
-    return ((env->interrupt_request & CPU_INTERRUPT_HARD) &&
-            (env->psw.mask & PSW_MASK_EXT));
+    return (env->interrupt_request & CPU_INTERRUPT_HARD) &&
+        (env->psw.mask & PSW_MASK_EXT);
 }
 
 static inline void regs_to_env(void)
index 9f1c1f6a005ebb2f529ccbafc7321ebc42871c53..ff068c550eec05fef028a6b7decd14beefcd345e 100644 (file)
@@ -27,9 +27,9 @@ register struct CPUSH4State *env asm(AREG0);
 #include "cpu.h"
 #include "exec-all.h"
 
-static inline int cpu_has_work(CPUState *env)
+static inline bool cpu_has_work(CPUState *env)
 {
-    return (env->interrupt_request & CPU_INTERRUPT_HARD);
+    return env->interrupt_request & CPU_INTERRUPT_HARD;
 }
 
 #ifndef CONFIG_USER_ONLY
index becdaf5bf3e5ecee7fad5ea8fd284ae3b12717fd..c1ac2fd8b33da30ea567766c056f0ef5d73e7057 100644 (file)
@@ -13,7 +13,7 @@ register struct CPUSPARCState *env asm(AREG0);
 #endif /* !defined(CONFIG_USER_ONLY) */
 
 /* op_helper.c */
-static inline int cpu_has_work(CPUState *env1)
+static inline bool cpu_has_work(CPUState *env1)
 {
     return (env1->interrupt_request & CPU_INTERRUPT_HARD) &&
            cpu_interrupts_enabled(env1);
index 4ab55f42cfd2d6bf83dfcbf9c88467880f89245d..ce4132fc894dc6cf58234429d17431d35a52edee 100644 (file)
@@ -26,7 +26,7 @@ static inline void regs_to_env(void)
 {
 }
 
-static inline int cpu_has_work(CPUState *env)
+static inline bool cpu_has_work(CPUState *env)
 {
     return env->interrupt_request &
         (CPU_INTERRUPT_HARD | CPU_INTERRUPT_EXITTB);