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

5-freebsd-12
Last change on this file since 3990b45 was 3990b45, checked in by Sebastian Huber <sebastian.huber@…>, on Aug 30, 2018 at 8:44:25 AM

Use rtems_counter_read() for get_cyclecount()

  • Property mode set to 100644
File size: 723 bytes
RevLine 
[d9e838b]1/**
2 * @file
3 *
4 * @ingroup rtems_bsd_rtems
5 *
6 * @brief TODO.
7 */
8
9/*
[01e57a9]10 * COPYRIGHT (c) 2012.
11 * On-Line Applications Research Corporation (OAR).
[d9e838b]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
[b086b5c]18#ifndef _RTEMS_BSD_MACHINE_CPU_H_
19#define _RTEMS_BSD_MACHINE_CPU_H_
[d8c5df7]20
[f244de9]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"
[b086b5c]23#endif
[d8c5df7]24
[3990b45]25#include <rtems/counter.h>
26
[de3ef24]27#define cpu_spinwait() do { } while (0)
28
[3990b45]29static __inline rtems_counter_ticks
[d9e838b]30get_cyclecount(void)
31{
[3990b45]32        return rtems_counter_read();
[d9e838b]33}
34
[b086b5c]35#endif /* _RTEMS_BSD_MACHINE_CPU_H_ */
Note: See TracBrowser for help on using the repository browser.