diff --git a/rtemsbsd/include/machine/cpu.h b/rtemsbsd/include/machine/cpu.h index 32881325..6ae4b448 100644 --- a/rtemsbsd/include/machine/cpu.h +++ b/rtemsbsd/include/machine/cpu.h @@ -22,13 +22,14 @@ #error "the header file must be included first" #endif +#include + #define cpu_spinwait() do { } while (0) -/* FIXME: This implementation is a security problem */ -static __inline uint64_t +static __inline rtems_counter_ticks get_cyclecount(void) { - return rtems_clock_get_ticks_since_boot(); + return rtems_counter_read(); } #endif /* _RTEMS_BSD_MACHINE_CPU_H_ */