summaryrefslogtreecommitdiffstats
path: root/rtemsbsd/include/machine/cpu.h
blob: 7ac6e33de89ea5ef120c9c8452eb4c51a1cee45f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/**
 * @file
 *
 * @ingroup rtems_bsd_rtems
 *
 * @brief TODO.
 */

/*
 * COPYRIGHT (c) 2012.
 * On-Line Applications Research Corporation (OAR).
 *
 * The license and distribution terms for this file may be
 * found in the file LICENSE in this distribution or at
 * http://www.rtems.com/license/LICENSE.
 */

#ifndef _RTEMS_BSD_MACHINE_CPU_H_
#define _RTEMS_BSD_MACHINE_CPU_H_

#ifndef _RTEMS_BSD_MACHINE_RTEMS_BSD_CONFIG_H_
#error "the header file <freebsd/machine/rtems-bsd-config.h> must be included first"
#endif

#define cpu_spinwait() do { } while (0)

/* FIXME: This implementation is a security problem */
static __inline uint64_t
get_cyclecount(void)
{
	return rtems_clock_get_ticks_since_boot();
}

#endif /* _RTEMS_BSD_MACHINE_CPU_H_ */