qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: [PATCH 05/32] use more meaningful values for kqemu_cpu_


From: Anthony Liguori
Subject: [Qemu-devel] Re: [PATCH 05/32] use more meaningful values for kqemu_cpu_exec
Date: Thu, 23 Oct 2008 08:57:21 -0500
User-agent: Thunderbird 2.0.0.17 (X11/20080925)

Glauber Costa wrote:
define constants that actually mean something instead of 1, 2, etc

Signed-off-by: Glauber Costa <address@hidden>
---
 cpu-exec.c |    4 ++--
 exec-all.h |    4 ++++
 kqemu.c    |   12 ++++++------
 3 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/cpu-exec.c b/cpu-exec.c
index f06df26..88b7d6f 100644
--- a/cpu-exec.c
+++ b/cpu-exec.c
@@ -339,10 +339,10 @@ int cpu_exec(CPUState *env1)
             env->eflags = env->eflags | cc_table[CC_OP].compute_all()  | (DF & 
DF_MASK);
             ret = kqemu_cpu_exec(env);
             env->eflags &= ~(DF_MASK | CC_O | CC_S | CC_Z | CC_A | CC_P | 
CC_C);
-            if (ret == 1) {
+            if (ret == EXEC_EXIT_INTR) {
                 /* exception */
                 longjmp(env->jmp_env, 1);
-            } else if (ret == 2) {
+            } else if (ret == EXEC_EXIT_SOFTMMU) {
                 /* softmmu execution needed */
             } else {
                 if (env->interrupt_request != 0) {
diff --git a/exec-all.h b/exec-all.h
index e3da98a..c10248b 100644
--- a/exec-all.h
+++ b/exec-all.h
@@ -356,6 +356,10 @@ static inline int can_do_io(CPUState *env)
 }
 #endif

+#define EXEC_EXIT_DONE 0
+#define EXEC_EXIT_INTR 1
+#define EXEC_EXIT_SOFTMMU 2
+

How about ACCEL_EXIT_?  These codes are accelerator specific after all.

Regards,

Anthony Liguori





reply via email to

[Prev in Thread] Current Thread [Next in Thread]