summaryrefslogtreecommitdiffstats
path: root/testsuites/tmitrontests/include
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1999-11-09 22:07:23 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1999-11-09 22:07:23 +0000
commit352c9b2035e32e56f10f261d94955d97f4ab0f1c (patch)
treef433e95ae0ab8d8854ea19b7f4bfab3ffb431726 /testsuites/tmitrontests/include
parent1007c3c8bae39e479f4c64d6c9ad6681442f7e8c (diff)
downloadrtems-352c9b2035e32e56f10f261d94955d97f4ab0f1c.tar.bz2
This patch adds the basic framework for the ITRON 3.0 API implementation
for RTEMS.
Diffstat (limited to 'testsuites/tmitrontests/include')
-rw-r--r--testsuites/tmitrontests/include/Makefile.am9
-rw-r--r--testsuites/tmitrontests/include/timesys.h55
2 files changed, 64 insertions, 0 deletions
diff --git a/testsuites/tmitrontests/include/Makefile.am b/testsuites/tmitrontests/include/Makefile.am
new file mode 100644
index 0000000000..fcf88cb578
--- /dev/null
+++ b/testsuites/tmitrontests/include/Makefile.am
@@ -0,0 +1,9 @@
+##
+## $Id$
+##
+
+AUTOMAKE_OPTIONS = foreign 1.4
+
+noinst_HEADERS = timesys.h
+
+include $(top_srcdir)/../../../../automake/local.am
diff --git a/testsuites/tmitrontests/include/timesys.h b/testsuites/tmitrontests/include/timesys.h
new file mode 100644
index 0000000000..4f75a9abf2
--- /dev/null
+++ b/testsuites/tmitrontests/include/timesys.h
@@ -0,0 +1,55 @@
+/* timesys.h
+ *
+ * This header file contains the global variables for the Time
+ * suite.
+ *
+ * COPYRIGHT (c) 1989-1998.
+ * On-Line Applications Research Corporation (OAR).
+ * Copyright assigned to U.S. Government, 1994.
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.OARcorp.com/rtems/license.html.
+ *
+ * $Id$
+ */
+
+#include <tmacros.h>
+
+/*
+ * How many times a particular operation is performed while timed.
+ */
+
+#define OPERATION_COUNT 100
+#define IT_COUNT 100
+
+/* functions */
+
+#define put_time( _message, _total_time, \
+ _iterations, _loop_overhead, _overhead ) \
+ printf( \
+ "%s %d\n", \
+ (_message), \
+ (((_total_time) - (_loop_overhead)) / (_iterations)) - (_overhead) \
+ )
+
+#if defined(STACK_CHECKER_ON) || defined(RTEMS_DEBUG)
+#define Print_Warning() \
+ do { \
+ puts( \
+ "\n" \
+ "THE TIMES REPORTED BY THIS TEST INCLUDE DEBUG CODE!\n" \
+ "\n" \
+ ); \
+ } while (0)
+
+#else
+#define Print_Warning()
+#endif
+
+/* variables */
+
+TEST_EXTERN volatile unsigned32 end_time; /* ending time variable */
+TEST_EXTERN volatile unsigned32 overhead; /* loop overhead variable */
+
+/* end of include file */