diff options
author | Alex Bennée <alex.bennee@linaro.org> | 2017-04-05 12:32:37 +0100 |
---|---|---|
committer | Alex Bennée <alex.bennee@linaro.org> | 2017-04-10 10:23:38 +0100 |
commit | 512d3c807177b5cfff6b5a4925d71ae1b5521093 (patch) | |
tree | e28725655ab542d8a7e0c5eab665c009a0ea6727 /include | |
parent | e4cd96571f00e290e93dcc65a6d2b616b159dea6 (diff) | |
download | qemu-512d3c807177b5cfff6b5a4925d71ae1b5521093.zip qemu-512d3c807177b5cfff6b5a4925d71ae1b5521093.tar.gz qemu-512d3c807177b5cfff6b5a4925d71ae1b5521093.tar.bz2 |
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 e1742f2..8a1eb74 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) */ |