diff options
| author | Alex Bennée | 2017-04-05 13:32:37 +0200 |
|---|---|---|
| committer | Alex Bennée | 2017-04-10 11:23:38 +0200 |
| commit | 512d3c807177b5cfff6b5a4925d71ae1b5521093 (patch) | |
| tree | e28725655ab542d8a7e0c5eab665c009a0ea6727 /include | |
| parent | cpus: don't credit executed instructions before they have run (diff) | |
| download | qemu-512d3c807177b5cfff6b5a4925d71ae1b5521093.tar.gz qemu-512d3c807177b5cfff6b5a4925d71ae1b5521093.tar.xz qemu-512d3c807177b5cfff6b5a4925d71ae1b5521093.zip | |
cpus: introduce cpu_update_icount helper
By holding off updates to timer_state.qemu_icount we can run into
trouble when the non-vCPU thread needs to know the time. This helper
ensures we atomically update timers_state.qemu_icount based on what
has been currently executed.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/qemu/timer.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/qemu/timer.h b/include/qemu/timer.h index e1742f2f3d..8a1eb74839 100644 --- a/include/qemu/timer.h +++ b/include/qemu/timer.h @@ -869,6 +869,7 @@ int64_t cpu_get_icount_raw(void); int64_t cpu_get_icount(void); int64_t cpu_get_clock(void); int64_t cpu_icount_to_ns(int64_t icount); +void cpu_update_icount(CPUState *cpu); /*******************************************/ /* host CPU ticks (if available) */ |
