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.com/license/LICENSE. |
---|
12 | * |
---|
13 | * $Id$ |
---|
14 | */ |
---|
15 | |
---|
16 | #include <rtems.h> |
---|
17 | #include <inttypes.h> |
---|
18 | #include "tmacros.h" |
---|
19 | |
---|
20 | /* functions */ |
---|
21 | |
---|
22 | rtems_task Init( |
---|
23 | rtems_task_argument argument |
---|
24 | ); |
---|
25 | |
---|
26 | rtems_task Test_task( |
---|
27 | rtems_task_argument argument |
---|
28 | ); |
---|
29 | |
---|
30 | /* global variables */ |
---|
31 | |
---|
32 | /* |
---|
33 | * Keep the names and IDs in global variables so another task can use them. |
---|
34 | */ |
---|
35 | |
---|
36 | extern rtems_id Task_id[ 4 ]; /* array of task ids */ |
---|
37 | extern rtems_name Task_name[ 4 ]; /* array of task names */ |
---|
38 | |
---|
39 | |
---|
40 | /* configuration information */ |
---|
41 | |
---|
42 | #include <bsp.h> /* for device driver prototypes */ |
---|
43 | |
---|
44 | #define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER |
---|
45 | #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER |
---|
46 | |
---|
47 | #define CONFIGURE_MAXIMUM_TASKS 4 |
---|
48 | |
---|
49 | #define CONFIGURE_RTEMS_INIT_TASKS_TABLE |
---|
50 | |
---|
51 | #define CONFIGURE_EXTRA_TASK_STACKS (3 * RTEMS_MINIMUM_STACK_SIZE) |
---|
52 | |
---|
53 | #include <rtems/confdefs.h> |
---|
54 | |
---|
55 | /* |
---|
56 | * This allows us to view the "Test_task" instantiations as a set |
---|
57 | * of numbered tasks by eliminating the number of application |
---|
58 | * tasks created. |
---|
59 | * |
---|
60 | * In reality, this is too complex for the purposes of this |
---|
61 | * example. It would have been easier to pass a task argument. :) |
---|
62 | * But it shows how rtems_id's can sometimes be used. |
---|
63 | */ |
---|
64 | |
---|
65 | #define task_number( tid ) \ |
---|
66 | ( rtems_object_id_get_index( tid ) - \ |
---|
67 | rtems_configuration_get_rtems_api_configuration()-> \ |
---|
68 | number_of_initialization_tasks ) |
---|
69 | |
---|
70 | /* end of include file */ |
---|