summaryrefslogtreecommitdiff
path: root/kernel/arch
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/arch')
-rw-r--r--kernel/arch/i386/asm_tsc.s8
-rw-r--r--kernel/arch/i386/tsc.h6
2 files changed, 8 insertions, 6 deletions
diff --git a/kernel/arch/i386/asm_tsc.s b/kernel/arch/i386/asm_tsc.s
index 963687e..5f9d858 100644
--- a/kernel/arch/i386/asm_tsc.s
+++ b/kernel/arch/i386/asm_tsc.s
@@ -1,17 +1,17 @@
.intel_syntax noprefix
-.global get_tsc
-.global get_hz
+.global tsc_get
+.global tsc_get_hz
# 1.193182 MHz
# So 0xFFFF is roughly 0.05492 seconds
# So take the result times 18 and you got your Hz
-get_tsc:
+tsc_get:
rdtsc
ret
-get_hz:
+tsc_get_hz:
cli
# Disable the gate for channel 2 so the clock can be set.
# This should only matter if the channel already has count
diff --git a/kernel/arch/i386/tsc.h b/kernel/arch/i386/tsc.h
index 2e29cf3..1a9e317 100644
--- a/kernel/arch/i386/tsc.h
+++ b/kernel/arch/i386/tsc.h
@@ -1,4 +1,6 @@
#include <typedefs.h>
-u64 get_tsc();
-u64 get_hz();
+void tsc_init(void);
+u64 tsc_get(void);
+u64 tsc_get_mhz(void);
+u64 tsc_calculate_ms(u64 tsc);