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 |
---|
16 | extern "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 | */ |
---|
26 | void 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 | */ |
---|
32 | const char *Get_Too_Long_Name(void); |
---|
33 | |
---|
34 | /* |
---|
35 | * Return a pointer to the longest legal POSIX name. |
---|
36 | */ |
---|
37 | const char *Get_Longest_Name(void); |
---|
38 | |
---|
39 | /* |
---|
40 | * Spin for specified number of ticks. |
---|
41 | */ |
---|
42 | void rtems_test_spin_for_ticks(int ticks); |
---|
43 | |
---|
44 | /* |
---|
45 | * Spin until the next clock tick |
---|
46 | */ |
---|
47 | void 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 | */ |
---|
58 | typedef void (*rtems_time_test_method_t)( |
---|
59 | int iteration, |
---|
60 | void *argument |
---|
61 | ); |
---|
62 | |
---|
63 | /* |
---|
64 | * Obtain baseline timing information for benchmark tests. |
---|
65 | */ |
---|
66 | void 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 |
---|