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.org/license/LICENSE. |
---|
8 | */ |
---|
9 | |
---|
10 | #ifndef __TEST_SUPPORT_h |
---|
11 | #define __TEST_SUPPORT_h |
---|
12 | |
---|
13 | #include <stdarg.h> |
---|
14 | |
---|
15 | #ifdef __cplusplus |
---|
16 | extern "C" { |
---|
17 | #endif |
---|
18 | |
---|
19 | /* |
---|
20 | * Return a pointer to the POSIX name that is slightly |
---|
21 | * beyond the legal limit. |
---|
22 | */ |
---|
23 | const char *Get_Too_Long_Name(void); |
---|
24 | |
---|
25 | /* |
---|
26 | * Return a pointer to the longest legal POSIX name. |
---|
27 | */ |
---|
28 | const char *Get_Longest_Name(void); |
---|
29 | |
---|
30 | /* |
---|
31 | * Spin for specified number of ticks. |
---|
32 | */ |
---|
33 | void rtems_test_spin_for_ticks(int ticks); |
---|
34 | |
---|
35 | /* |
---|
36 | * Spin until the next clock tick |
---|
37 | */ |
---|
38 | void rtems_test_spin_until_next_tick( void ); |
---|
39 | |
---|
40 | /*********************************************************************/ |
---|
41 | /*********************************************************************/ |
---|
42 | /************** TMTEST SUPPORT **************/ |
---|
43 | /*********************************************************************/ |
---|
44 | /*********************************************************************/ |
---|
45 | |
---|
46 | /* |
---|
47 | * Type of method used for timing operations |
---|
48 | */ |
---|
49 | typedef void (*rtems_time_test_method_t)( |
---|
50 | int iteration, |
---|
51 | void *argument |
---|
52 | ); |
---|
53 | |
---|
54 | /* |
---|
55 | * Obtain baseline timing information for benchmark tests. |
---|
56 | */ |
---|
57 | void rtems_time_test_measure_operation( |
---|
58 | const char *description, |
---|
59 | rtems_time_test_method_t operation, |
---|
60 | void *argument, |
---|
61 | int iterations, |
---|
62 | int overhead |
---|
63 | ); |
---|
64 | |
---|
65 | /*********************************************************************/ |
---|
66 | /*********************************************************************/ |
---|
67 | /************** TEST SUPPORT **************/ |
---|
68 | /*********************************************************************/ |
---|
69 | /*********************************************************************/ |
---|
70 | |
---|
71 | void locked_print_initialize(void); |
---|
72 | |
---|
73 | int locked_printf(const char *fmt, ...); |
---|
74 | |
---|
75 | int locked_vprintf(const char *fmt, va_list ap); |
---|
76 | |
---|
77 | int locked_printf_plugin(void *context, const char *fmt, ...); |
---|
78 | |
---|
79 | void locked_printk(const char *fmt, ...); |
---|
80 | |
---|
81 | #ifdef __cplusplus |
---|
82 | }; |
---|
83 | #endif |
---|
84 | |
---|
85 | #endif |
---|