summaryrefslogtreecommitdiffstats
path: root/testsuites/tmitrontests/include
diff options
context:
space:
mode:
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 */