OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [tests/] [tmtests/] [include/] [timesys.h] - Blame information for rev 547

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 30 unneback
/*  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.OARcorp.com/rtems/license.html.
12
 *
13
 *  $Id: timesys.h,v 1.2 2001-09-27 12:02:40 chris Exp $
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
    fprintf( stderr, \
39
      "%s %d\n", \
40
      (_message), \
41
      (((_total_time) - (_loop_overhead)) / (_iterations)) - (_overhead) \
42
    )
43
 
44
#if  defined(STACK_CHECKER_ON) || 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
 
60
TEST_EXTERN volatile rtems_unsigned32 end_time;   /* ending time variable */
61
TEST_EXTERN volatile rtems_unsigned32 overhead;   /* loop overhead variable */
62
 
63
TEST_EXTERN rtems_id   Task_id[ OPERATION_COUNT+1 ];   /* array of task ids */
64
TEST_EXTERN rtems_id   Task_name[ OPERATION_COUNT+1 ]; /* array of task names */
65
 
66
/* end of include file */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.