summaryrefslogtreecommitdiffstats
path: root/sys/alpha/include
diff options
context:
space:
mode:
Diffstat (limited to 'sys/alpha/include')
-rw-r--r--sys/alpha/include/cpu.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/alpha/include/cpu.h b/sys/alpha/include/cpu.h
index a45b4d1..a0be38f 100644
--- a/sys/alpha/include/cpu.h
+++ b/sys/alpha/include/cpu.h
@@ -173,6 +173,16 @@ void syscall __P((u_int64_t, struct trapframe *));
void trap __P((unsigned long, unsigned long, unsigned long, unsigned long,
struct trapframe *));
+/*
+ * Return contents of in-cpu fast counter as a sort of "bogo-time"
+ * for non-critical timing.
+ */
+static __inline u_int64_t
+get_cyclecount(void)
+{
+ return (alpha_rpcc());
+}
+
#endif /* _KERNEL */
#endif /* _ALPHA_CPU_H_ */
OpenPOWER on IntegriCloud