summaryrefslogtreecommitdiffstats
path: root/rtemsbsd/src/rtems-bsd-cyclecount.c
diff options
context:
space:
mode:
authorJennifer Averett <jennifer.averett@oarcorp.com>2012-04-16 12:39:58 -0500
committerJennifer Averett <jennifer.averett@oarcorp.com>2012-04-16 12:39:58 -0500
commitd9e838b8825d8d306195b2d0fb726bcccb099e1d (patch)
tree531ec2bfc5279e74e44f4889012a59ed0583710c /rtemsbsd/src/rtems-bsd-cyclecount.c
parentmoved taskqueue_enqueue_fast from a define to a method to resolve linker errors. (diff)
downloadrtems-libbsd-d9e838b8825d8d306195b2d0fb726bcccb099e1d.tar.bz2
Added get_cyclecount() method.
Diffstat (limited to 'rtemsbsd/src/rtems-bsd-cyclecount.c')
-rw-r--r--rtemsbsd/src/rtems-bsd-cyclecount.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/rtemsbsd/src/rtems-bsd-cyclecount.c b/rtemsbsd/src/rtems-bsd-cyclecount.c
new file mode 100644
index 00000000..e0c6605d
--- /dev/null
+++ b/rtemsbsd/src/rtems-bsd-cyclecount.c
@@ -0,0 +1,29 @@
+/**
+ * @file
+ *
+ * @ingroup rtems_bsd_rtems
+ *
+ * @brief TODO.
+ */
+
+/*
+ * COPYRIGHT (c) 1989-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.
+ */
+
+#include <string.h>
+#include <stdio.h>
+#include <rtems.h>
+
+u_int64_t
+get_cyclecount(void)
+{
+ u_int64_t value;
+ value = rtems_clock_get_ticks_since_boot();
+ return value;
+}
+