From bd2595adfdb532c6d27d9246c1e221deee0e95c2 Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Wed, 31 Aug 2016 19:37:03 +0200 Subject: [PATCH] use the new get_rdtsc function to increase the readability --- hermit/arch/x86/kernel/timer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hermit/arch/x86/kernel/timer.c b/hermit/arch/x86/kernel/timer.c index 8e07fe1b4..fb87fe8fa 100644 --- a/hermit/arch/x86/kernel/timer.c +++ b/hermit/arch/x86/kernel/timer.c @@ -54,7 +54,7 @@ void check_ticks(void) if (!cpu_freq) return; - uint64_t curr_rdtsc = has_rdtscp() ? rdtscp(NULL) : rdtsc(); + uint64_t curr_rdtsc = get_rdtsc(); uint64_t diff; rmb(); @@ -187,7 +187,7 @@ int timer_init(void) irq_install_handler(121, wakeup_handler); #ifdef DYNAMIC_TICKS - boot_tsc = has_rdtscp() ? rdtscp(NULL) : rdtsc(); + boot_tsc = get_rdtsc(); set_per_core(last_rdtsc, boot_tsc); #endif