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.org/license/LICENSE. |
---|
8 | */ |
---|
9 | |
---|
10 | #ifndef __INTERRUPT_CRITICAL_SECTIONS_TEST_SUPPORT_h |
---|
11 | #define __INTERRUPT_CRITICAL_SECTIONS_TEST_SUPPORT_h |
---|
12 | |
---|
13 | /** |
---|
14 | * @brief Initialize Test Support |
---|
15 | * |
---|
16 | * @param[in] tsr is the optional timer service routine to fire |
---|
17 | */ |
---|
18 | void interrupt_critical_section_test_support_initialize( |
---|
19 | rtems_timer_service_routine_entry tsr |
---|
20 | ); |
---|
21 | |
---|
22 | /** |
---|
23 | * @brief Delay Test Support |
---|
24 | * |
---|
25 | * This method delays a varying amount of time each call. |
---|
26 | * |
---|
27 | * @return This method returns true each time the delay counter has |
---|
28 | * to be reset. |
---|
29 | */ |
---|
30 | bool interrupt_critical_section_test_support_delay(void); |
---|
31 | |
---|
32 | /** |
---|
33 | * @brief Interrupt critical section test. |
---|
34 | * |
---|
35 | * This function first estimates the test body duration and then repeatedly |
---|
36 | * calls the test body with varying times to the next clock tick interrupt. |
---|
37 | * |
---|
38 | * @param[in] test_body The test body function. In case the test body returns |
---|
39 | * true, then the test iteration stops. |
---|
40 | * @param[in] test_body_arg The argument for the test body function. |
---|
41 | * @param[in] tsr An optional timer service routine. |
---|
42 | * |
---|
43 | * @return The test body return status. |
---|
44 | */ |
---|
45 | bool interrupt_critical_section_test( |
---|
46 | bool ( *test_body )( void * ), |
---|
47 | void *test_body_arg, |
---|
48 | rtems_timer_service_routine_entry tsr |
---|
49 | ); |
---|
50 | |
---|
51 | #endif |
---|
52 | |
---|