1 | /* |
---|
2 | * The license and distribution terms for this file may be |
---|
3 | * found in the file LICENSE in this distribution or at |
---|
4 | * http://www.OARcorp.com/rtems/license.html. |
---|
5 | * |
---|
6 | * $Id$ |
---|
7 | */ |
---|
8 | |
---|
9 | #ifndef __RTEMS_ITRON_TASK_h_ |
---|
10 | #define __RTEMS_ITRON_TASK_h_ |
---|
11 | |
---|
12 | #ifdef __cplusplus |
---|
13 | extern "C" { |
---|
14 | #endif |
---|
15 | |
---|
16 | #include <rtems/itron/object.h> |
---|
17 | #include <rtems/itron/config.h> |
---|
18 | #include <rtems/score/thread.h> |
---|
19 | |
---|
20 | /* |
---|
21 | * This macro evaluates to TRUE if there should be a "context error." |
---|
22 | * This is defined as a blocking directive being issed from |
---|
23 | * task-independent portions or a task in dispatch disabled state. |
---|
24 | * |
---|
25 | * NOTE: Dispatching is disabled in interrupts so this should cover |
---|
26 | * both cases. |
---|
27 | */ |
---|
28 | |
---|
29 | #define _ITRON_Is_in_non_task_state() \ |
---|
30 | (_Thread_Dispatch_disable_level != 0) |
---|
31 | |
---|
32 | /* |
---|
33 | * This is the API specific information required by each thread for |
---|
34 | * the ITRON API to function correctly. |
---|
35 | */ |
---|
36 | |
---|
37 | |
---|
38 | typedef struct { |
---|
39 | unsigned32 unused; /* no use for the API extension */ |
---|
40 | /* structure for ITRON identified yet */ |
---|
41 | } ITRON_API_Control; |
---|
42 | |
---|
43 | /* |
---|
44 | * The following defines the information control block used to |
---|
45 | * manage this class of objects. |
---|
46 | */ |
---|
47 | |
---|
48 | ITRON_EXTERN Objects_Information _ITRON_Task_Information; |
---|
49 | |
---|
50 | /* |
---|
51 | * These are used to manage the user initialization tasks. |
---|
52 | */ |
---|
53 | |
---|
54 | ITRON_EXTERN itron_initialization_tasks_table |
---|
55 | *_ITRON_Task_User_initialization_tasks; |
---|
56 | ITRON_EXTERN unsigned32 _ITRON_Task_Number_of_initialization_tasks; |
---|
57 | |
---|
58 | |
---|
59 | /* |
---|
60 | * _ITRON_Task_Manager_initialization |
---|
61 | * |
---|
62 | * This routine initializes the ITRON Task Manager. |
---|
63 | */ |
---|
64 | |
---|
65 | void _ITRON_Task_Manager_initialization( |
---|
66 | unsigned32 maximum_tasks, |
---|
67 | unsigned32 number_of_initialization_tasks, |
---|
68 | itron_initialization_tasks_table *user_tasks |
---|
69 | ); |
---|
70 | |
---|
71 | /* |
---|
72 | * |
---|
73 | * _ITRON_Delete_task |
---|
74 | */ |
---|
75 | |
---|
76 | ER _ITRON_Delete_task( |
---|
77 | Thread_Control *the_thread |
---|
78 | ); |
---|
79 | |
---|
80 | #include <rtems/itron/task.inl> |
---|
81 | |
---|
82 | #ifdef __cplusplus |
---|
83 | } |
---|
84 | #endif |
---|
85 | |
---|
86 | #endif |
---|
87 | /* end of include file */ |
---|
88 | |
---|