]> xenbits.xensource.com Git - mini-os.git/commit
mini-os: simplify monotonic_clock()
authorJuergen Gross <jgross@suse.com>
Wed, 24 Jul 2024 10:02:25 +0000 (12:02 +0200)
committerJan Beulich <jbeulich@suse.com>
Wed, 24 Jul 2024 10:02:25 +0000 (12:02 +0200)
commit4f019908a03883492ac232559dbeb33469946b3b
tree6c15e16edc405afde392f5cac7495a0259397cbf
parente390b45fe38967e2f321420959fc86efb7abbb54
mini-os: simplify monotonic_clock()

monotonic_clock() in arch/x86/time.c is more complex than needed: it
has basically two nested loops making sure the time data obtained from
Xen are valid.

Simplify that by merging some of the used sub-functions into the main
function and using only a single loop. Further simplify the code by
using struct vcpu_time_info for the local instance instead of defining
a similar structure in the code.

Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
arch/x86/time.c