From 352c9b2035e32e56f10f261d94955d97f4ab0f1c Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Tue, 9 Nov 1999 22:07:23 +0000 Subject: This patch adds the basic framework for the ITRON 3.0 API implementation for RTEMS. --- testsuites/tmitrontests/include/timesys.h | 55 +++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 testsuites/tmitrontests/include/timesys.h (limited to 'testsuites/tmitrontests/include/timesys.h') 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 + +/* + * 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 */ -- cgit v1.2.3