source: rtems/testsuites/support/include/test_support.h @ 152a2841

4.11
Last change on this file since 152a2841 was 152a2841, checked in by Joel Sherrill <joel.sherrill@…>, on Jun 28, 2011 at 9:09:13 PM

2011-06-28 Joel Sherrill <joel.sherrill@…>

  • configure.ac, support/include/test_support.h:
  • support/src/locked_print.c: New file.
  • Property mode set to 100644
File size: 2.5 KB
Line 
1/*
2 *  COPYRIGHT (c) 1989-2011.
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 workspace
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 *  Allocate a number of small blocks from the heap
30 *  until the largest free block of memory available is
31 *  smaller than smallest.
32 *
33 *  NOTE: The memory CANNOT be freed.
34 */
35void Allocate_majority_of_heap( int smallest );
36
37/*
38 *  Return a pointer to the POSIX name that is slightly
39 *  beyond the legal limit.
40 */
41const char *Get_Too_Long_Name(void);
42
43/*
44 *  Return a pointer to the longest legal POSIX name.
45 */
46const char *Get_Longest_Name(void);
47
48/*
49 *  Spin for specified number of ticks.
50 */
51void rtems_test_spin_for_ticks(int ticks);
52
53/*
54 *  Spin until the next clock tick
55 */
56void rtems_test_spin_until_next_tick( void );
57
58/*********************************************************************/
59/*********************************************************************/
60/**************              TMTEST SUPPORT             **************/
61/*********************************************************************/
62/*********************************************************************/
63
64/*
65 *  Type of method used for timing operations
66 */
67typedef void (*rtems_time_test_method_t)(
68  int    iteration,
69  void  *argument
70);
71
72/*
73 *  Obtain baseline timing information for benchmark tests.
74 */
75void rtems_time_test_measure_operation(
76  const char               *description,
77  rtems_time_test_method_t  operation,
78  void                     *argument,
79  int                       iterations,
80  int                       overhead
81);
82
83/*********************************************************************/
84/*********************************************************************/
85/**************              TEST SUPPORT               **************/
86/*********************************************************************/
87/*********************************************************************/
88extern void locked_print_init(void);
89extern void locked_printf(const char *fmt, ...);
90extern void locked_printk(const char *fmt, ...);
91
92#ifdef __cplusplus
93};
94#endif
95
96#endif
Note: See TracBrowser for help on using the repository browser.