mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-27 12:02:04 -06:00
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>
This commit is contained in:
parent
e4cd96571f
commit
512d3c8071
2 changed files with 22 additions and 2 deletions
|
@ -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) */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue