source: rtems-libbsd/rtemsbsd/include/machine/cpu.h @ 3990b45

55-freebsd-126-freebsd-12
Last change on this file since 3990b45 was 3990b45, checked in by Sebastian Huber <sebastian.huber@…>, on 08/30/18 at 08:44:25

Use rtems_counter_read() for get_cyclecount()

  • Property mode set to 100644
File size: 723 bytes
Line 
1/**
2 * @file
3 *
4 * @ingroup rtems_bsd_rtems
5 *
6 * @brief TODO.
7 */
8
9/*
10 * COPYRIGHT (c) 2012.
11 * On-Line Applications Research Corporation (OAR).
12 *
13 * The license and distribution terms for this file may be
14 * found in the file LICENSE in this distribution or at
15 * http://www.rtems.com/license/LICENSE.
16 */
17
18#ifndef _RTEMS_BSD_MACHINE_CPU_H_
19#define _RTEMS_BSD_MACHINE_CPU_H_
20
21#ifndef _RTEMS_BSD_MACHINE_RTEMS_BSD_KERNEL_SPACE_H_
22#error "the header file <machine/rtems-bsd-kernel-space.h> must be included first"
23#endif
24
25#include <rtems/counter.h>
26
27#define cpu_spinwait() do { } while (0)
28
29static __inline rtems_counter_ticks
30get_cyclecount(void)
31{
32        return rtems_counter_read();
33}
34
35#endif /* _RTEMS_BSD_MACHINE_CPU_H_ */
Note: See TracBrowser for help on using the repository browser.