diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2011-09-12 13:57:37 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2011-10-21 18:14:30 +0200 |
commit | 946fb27c1dc158f10a6e3ce0374a161dce04c27b (patch) | |
tree | 1825f63a5fff335fd8b43980261fb4551a8193ba /exec-all.h | |
parent | dc2dfcf0002b4e6be494959a1ed2589dd109def0 (diff) |
qemu-timer: move icount to cpus.c
None of this is needed by tools, and most of it can even be made static
inside cpus.c.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'exec-all.h')
-rw-r--r-- | exec-all.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/exec-all.h b/exec-all.h index 1120f84661..72ef246793 100644 --- a/exec-all.h +++ b/exec-all.h @@ -356,4 +356,18 @@ extern int singlestep; /* cpu-exec.c */ extern volatile sig_atomic_t exit_request; +/* Deterministic execution requires that IO only be performed on the last + instruction of a TB so that interrupts take effect immediately. */ +static inline int can_do_io(CPUState *env) +{ + if (!use_icount) { + return 1; + } + /* If not executing code then assume we are ok. */ + if (!env->current_tb) { + return 1; + } + return env->can_do_io != 0; +} + #endif |