summaryrefslogtreecommitdiffstats
path: root/rtemsbsd
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2018-08-30 10:44:25 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2018-09-11 11:37:34 +0200
commit3990b45e97e074767dff75f5e710bb905e53e2d3 (patch)
tree1a3b782dedc53b13a2cb2b5611aa5e27f11f3fec /rtemsbsd
parentdw_mmc: Avoid conflicting device ivars (diff)
downloadrtems-libbsd-3990b45e97e074767dff75f5e710bb905e53e2d3.tar.bz2
Use rtems_counter_read() for get_cyclecount()
Diffstat (limited to 'rtemsbsd')
-rw-r--r--rtemsbsd/include/machine/cpu.h7
1 files changed, 4 insertions, 3 deletions
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 <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_ */