25 #ifndef _LIB_COBALT_ARM_TSC_H
26 #define _LIB_COBALT_ARM_TSC_H
28 #include <asm/xenomai/uapi/tsc.h>
29 #include <asm/xenomai/features.h>
35 typedef unsigned long long __xn_rdtsc_t(
volatile unsigned *vaddr);
36 struct __xn_full_tscinfo {
37 __xn_rdtsc_t *kuser_tsc_get;
38 struct __xn_tscinfo kinfo;
40 extern struct __xn_full_tscinfo __xn_tscinfo;
42 static inline __attribute__((always_inline))
43 unsigned
long long cobalt_read_tsc(
void)
45 return __xn_tscinfo.kuser_tsc_get(__xn_tscinfo.kinfo.counter);