1 | /* system.h |
---|
2 | * |
---|
3 | * This include file contains information that is included in every |
---|
4 | * function in the test set. |
---|
5 | * |
---|
6 | * COPYRIGHT (c) 1989-2009. |
---|
7 | * On-Line Applications Research Corporation (OAR). |
---|
8 | * |
---|
9 | * The license and distribution terms for this file may be |
---|
10 | * found in the file LICENSE in this distribution or at |
---|
11 | * http://www.rtems.org/license/LICENSE. |
---|
12 | */ |
---|
13 | |
---|
14 | #include <tmacros.h> |
---|
15 | |
---|
16 | /* functions */ |
---|
17 | |
---|
18 | rtems_task Init( |
---|
19 | rtems_task_argument argument |
---|
20 | ); |
---|
21 | |
---|
22 | rtems_task Task_1( |
---|
23 | rtems_task_argument argument |
---|
24 | ); |
---|
25 | |
---|
26 | rtems_task Task_2( |
---|
27 | rtems_task_argument argument |
---|
28 | ); |
---|
29 | |
---|
30 | rtems_task Task_3( |
---|
31 | rtems_task_argument argument |
---|
32 | ); |
---|
33 | |
---|
34 | rtems_task Task_4( |
---|
35 | rtems_task_argument argument |
---|
36 | ); |
---|
37 | |
---|
38 | bool Task_create_extension( |
---|
39 | rtems_tcb *unused, |
---|
40 | rtems_tcb *created_task |
---|
41 | ); |
---|
42 | |
---|
43 | void Task_delete_extension( |
---|
44 | rtems_tcb *running_task, |
---|
45 | rtems_tcb *deleted_task |
---|
46 | ); |
---|
47 | |
---|
48 | void Task_restart_extension( |
---|
49 | rtems_tcb *unused, |
---|
50 | rtems_tcb *restarted_task |
---|
51 | ); |
---|
52 | |
---|
53 | void Task_start_extension( |
---|
54 | rtems_tcb *unused, |
---|
55 | rtems_tcb *started_task |
---|
56 | ); |
---|
57 | |
---|
58 | void Task_exit_extension( |
---|
59 | rtems_tcb *running_task |
---|
60 | ); |
---|
61 | |
---|
62 | /* configuration information */ |
---|
63 | |
---|
64 | #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER |
---|
65 | #define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER |
---|
66 | |
---|
67 | #define CONFIGURE_ENABLE_CLASSIC_API_NOTEPADS |
---|
68 | |
---|
69 | #define CONFIGURE_MAXIMUM_USER_EXTENSIONS 2 |
---|
70 | #define CONFIGURE_TICKS_PER_TIMESLICE 100 |
---|
71 | |
---|
72 | #define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION |
---|
73 | |
---|
74 | #define CONFIGURE_RTEMS_INIT_TASKS_TABLE |
---|
75 | |
---|
76 | #define CONFIGURE_EXTRA_TASK_STACKS (4 * RTEMS_MINIMUM_STACK_SIZE) |
---|
77 | #define CONFIGURE_MAXIMUM_TASKS 5 |
---|
78 | |
---|
79 | #include <rtems/confdefs.h> |
---|
80 | |
---|
81 | /* global variables */ |
---|
82 | |
---|
83 | TEST_EXTERN rtems_id Task_id[ 5 ]; /* array of task ids */ |
---|
84 | TEST_EXTERN rtems_name Task_name[ 5 ]; /* array of task names */ |
---|
85 | |
---|
86 | TEST_EXTERN rtems_id Extension_id[ 4 ]; |
---|
87 | TEST_EXTERN rtems_name Extension_name[ 4 ]; /* array of task names */ |
---|
88 | |
---|
89 | TEST_EXTERN int Task_created[ RTEMS_ARRAY_SIZE( Task_id ) ]; |
---|
90 | |
---|
91 | TEST_EXTERN int Task_started[ RTEMS_ARRAY_SIZE( Task_id ) ]; |
---|
92 | |
---|
93 | TEST_EXTERN int Task_restarted[ RTEMS_ARRAY_SIZE( Task_id ) ]; |
---|
94 | |
---|
95 | TEST_EXTERN int Task_deleted[ RTEMS_ARRAY_SIZE( Task_id ) ]; |
---|
96 | |
---|
97 | RTEMS_INLINE_ROUTINE void assert_extension_counts( const int *table, int tasks ) |
---|
98 | { |
---|
99 | size_t i; |
---|
100 | |
---|
101 | for ( i = 0; i < RTEMS_ARRAY_SIZE( Task_id ); ++i ) { |
---|
102 | rtems_test_assert( |
---|
103 | ( tasks & ( 1 << i ) ) != 0 ? table[ i ] == 1 : table[ i ] == 0 |
---|
104 | ); |
---|
105 | } |
---|
106 | } |
---|
107 | |
---|
108 | /* end of include file */ |
---|