summaryrefslogtreecommitdiff
path: root/arch/arch-x86.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arch-x86.h')
-rw-r--r--arch/arch-x86.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/arch-x86.h b/arch/arch-x86.h
index 9631437e..bffd1dd8 100644
--- a/arch/arch-x86.h
+++ b/arch/arch-x86.h
@@ -38,7 +38,17 @@ static inline unsigned long arch_ffz(unsigned long bitmask)
__asm__("bsfl %1,%0" :"=r" (bitmask) :"r" (~bitmask));
return bitmask;
}
+
+static inline unsigned long long get_cpu_clock(void)
+{
+ unsigned long ret;
+
+ __asm__ __volatile__("rdtsc" : "=A" (ret));
+ return ret;
+}
+
#define ARCH_HAVE_FFZ
#define ARCH_HAVE_SSE
+#define ARCH_HAVE_CPU_CLOCK
#endif