14 lines
235 B
C
14 lines
235 B
C
|
#ifndef __GILBRALTAR_CPU_AARCH64__
|
||
|
#define __GILBRALTAR_CPU_AARCH64__
|
||
|
|
||
|
#include <stdint.h>
|
||
|
|
||
|
static inline uint64_t cpu_cntpct(void) {
|
||
|
uint64_t val;
|
||
|
|
||
|
__asm__ __volatile("mrs %0, cntpct_el0" : "=r"(val)::);
|
||
|
return (val);
|
||
|
}
|
||
|
|
||
|
#endif
|