source: rtems/testsuites/support/include/test_support.h @ 16d1bd3

4.115
Last change on this file since 16d1bd3 was 82fbd35, checked in by Joel Sherrill <joel.sherrill@…>, on 06/21/10 at 16:54:17

2010-06-21 Joel Sherrill <joel.sherrill@…>

  • support/include/test_support.h, support/src/tmtests_empty_function.c: Add helper so it is easier to write a basic repeated operation tmtest.
  • support/src/tmtests_support.c: New file.
  • Property mode set to 100644
File size: 1.8 KB
Line 
1/*
2 *  COPYRIGHT (c) 1989-2009.
3 *  On-Line Applications Research Corporation (OAR).
4 *
5 *  The license and distribution terms for this file may be
6 *  found in the file LICENSE in this distribution or at
7 *  http://www.rtems.com/license/LICENSE.
8 *
9 *  $Id$
10 */
11
12#ifndef __TEST_SUPPORT_h
13#define __TEST_SUPPORT_h
14
15#ifdef __cplusplus
16extern "C" {
17#endif
18
19/*
20 *  Allocate a number of small blocks from the heap
21 *  until the largest free block of memory available is
22 *  smaller than smallest.
23 *
24 *  NOTE: The memory CANNOT be freed.
25 */
26void Allocate_majority_of_workspace( int smallest );
27
28/*
29 *  Return a pointer to the POSIX name that is slightly
30 *  beyond the legal limit.
31 */
32const char *Get_Too_Long_Name(void);
33
34/*
35 *  Return a pointer to the longest legal POSIX name.
36 */
37const char *Get_Longest_Name(void);
38
39/*
40 *  Spin for specified number of ticks.
41 */
42void rtems_test_spin_for_ticks(int ticks);
43
44/*
45 *  Spin until the next clock tick
46 */
47void rtems_test_spin_until_next_tick( void );
48
49/*********************************************************************/
50/*********************************************************************/
51/**************              TMTEST SUPPORT             **************/
52/*********************************************************************/
53/*********************************************************************/
54
55/*
56 *  Type of method used for timing operations
57 */
58typedef void (*rtems_time_test_method_t)(
59  int    iteration,
60  void  *argument
61);
62
63/*
64 *  Obtain baseline timing information for benchmark tests.
65 */
66void rtems_time_test_measure_operation(
67  const char               *description,
68  rtems_time_test_method_t  operation,
69  void                     *argument,
70  int                       iterations,
71  int                       overhead
72);
73
74#ifdef __cplusplus
75};
76#endif
77
78#endif
Note: See TracBrowser for help on using the repository browser.