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
+