summaryrefslogtreecommitdiffstats
path: root/rtemsbsd/freebsd/machine/cpu.h
diff options
context:
space:
mode:
authorJennifer Averett <jennifer.averett@oarcorp.com>2012-04-18 09:46:21 -0500
committerJennifer Averett <jennifer.averett@oarcorp.com>2012-04-18 09:46:21 -0500
commitd8c5df73f682881aba1baa5730b4234f8f26c4ab (patch)
tree1e62bee56e37e636c731d00e29a807ce643cb8aa /rtemsbsd/freebsd/machine/cpu.h
parentAdd BUS_DMA(9) support for mbufs (diff)
downloadrtems-libbsd-d8c5df73f682881aba1baa5730b4234f8f26c4ab.tar.bz2
Moved rtems-bsd-cyclecount.c to cpu.h
Diffstat (limited to 'rtemsbsd/freebsd/machine/cpu.h')
-rw-r--r--rtemsbsd/freebsd/machine/cpu.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/rtemsbsd/freebsd/machine/cpu.h b/rtemsbsd/freebsd/machine/cpu.h
new file mode 100644
index 00000000..625cd962
--- /dev/null
+++ b/rtemsbsd/freebsd/machine/cpu.h
@@ -0,0 +1,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 _MACHINE_CPU_H_
+#define _MACHINE_CPU_H_
+
+
+#include <string.h>
+#include <stdio.h>
+#include <rtems.h>
+
+#ifdef _KERNEL
+static __inline u_int64_t
+get_cyclecount(void)
+{
+ return rtems_clock_get_ticks_since_boot();
+}
+#endif /* _KERNEL */
+
+#endif /* !MACHINE_CPU_H */