mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-05-13 16:10:38 +08:00
Use rtems_counter_read() for get_cyclecount()
This commit is contained in:
parent
0f9d58f58b
commit
3990b45e97
@ -22,13 +22,14 @@
|
||||
#error "the header file <machine/rtems-bsd-kernel-space.h> must be included first"
|
||||
#endif
|
||||
|
||||
#include <rtems/counter.h>
|
||||
|
||||
#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_ */
|
||||
|
Loading…
x
Reference in New Issue
Block a user