source: rtems/testsuites/tmtests/include/timesys.h @ 6c89d72

4.104.115
Last change on this file since 6c89d72 was 6c89d72, checked in by Joel Sherrill <joel.sherrill@…>, on 09/17/08 at 19:31:23

2008-09-17 Joel Sherrill <joel.sherrill@…>

  • include/timesys.h: Rename STACK_CHECKER_ON to more appropriate CONFIGURE_STACK_CHECKER_ENABLED.
  • Property mode set to 100644
File size: 1.9 KB
Line 
1/*  timesys.h
2 *
3 *  This header file contains the global variables for the Time
4 *  suite.
5 *
6 *  COPYRIGHT (c) 1989-1999.
7 *  On-Line Applications Research Corporation (OAR).
8 *
9 *  The license and distribution terms for this file may be
10 *  found in the file LICENSE in this distribution or at
11 *  http://www.rtems.com/license/LICENSE.
12 *
13 *  $Id$
14 */
15
16#include <tmacros.h>
17
18/*
19 *  This constant determines the maximum number of a resource
20 *  that will be created.  For example, some test create multiple
21 *  blocking tasks to determine the execution time of blocking
22 *  services.  By default, the blocking time of 100 tasks will
23 *  be measured.  Small targets often do not have enough memory
24 *  to create 100 tasks.  By overriding the default OPERATION_COUNT
25 *  with a lower number (typically 10 or less), all of the time tests
26 *  can usually be run.  This is stil not very fine-grained but
27 *  is enough to significantly reduce memory consumption.
28 */
29
30#ifndef OPERATION_COUNT
31#define OPERATION_COUNT 100
32#endif
33
34/* functions */
35
36#define put_time( _message, _total_time, \
37                  _iterations, _loop_overhead, _overhead ) \
38    printf( \
39      "%s %d\n", \
40      (_message), \
41      (((_total_time) - (_loop_overhead)) / (_iterations)) - (_overhead) \
42    )
43
44#if  defined(CONFIGURE_STACK_CHECKER_ENABLED) || defined(RTEMS_DEBUG)
45#define Print_Warning() \
46  do { \
47    puts( \
48      "\n" \
49      "THE TIMES REPORTED BY THIS TEST INCLUDE DEBUG CODE!\n" \
50      "\n" \
51    ); \
52  } while (0)
53
54#else
55#define Print_Warning()
56#endif
57
58/* variables */
59
60TEST_EXTERN volatile uint32_t   end_time;   /* ending time variable */
61TEST_EXTERN volatile uint32_t   overhead;   /* loop overhead variable */
62
63TEST_EXTERN rtems_id   Task_id[ OPERATION_COUNT+1 ];   /* array of task ids */
64TEST_EXTERN rtems_id   Task_name[ OPERATION_COUNT+1 ]; /* array of task names */
65
66/* end of include file */
Note: See TracBrowser for help on using the repository browser.