1 | /** |
---|
2 | * @file rtems/rtems/taskmp.h |
---|
3 | * |
---|
4 | * This include file contains all the constants and structures associated |
---|
5 | * with the multiprocessing support in the task manager. |
---|
6 | */ |
---|
7 | |
---|
8 | /* COPYRIGHT (c) 1989-1999. |
---|
9 | * On-Line Applications Research Corporation (OAR). |
---|
10 | * |
---|
11 | * The license and distribution terms for this file may be |
---|
12 | * found in the file LICENSE in this distribution or at |
---|
13 | * http://www.rtems.com/license/LICENSE. |
---|
14 | * |
---|
15 | * $Id$ |
---|
16 | */ |
---|
17 | |
---|
18 | #ifndef _RTEMS_RTEMS_TASKMP_H |
---|
19 | #define _RTEMS_RTEMS_TASKMP_H |
---|
20 | |
---|
21 | #include <rtems/score/mppkt.h> |
---|
22 | #include <rtems/score/object.h> |
---|
23 | #include <rtems/rtems/options.h> |
---|
24 | #include <rtems/score/priority.h> |
---|
25 | #include <rtems/rtems/tasks.h> |
---|
26 | #include <rtems/score/thread.h> |
---|
27 | |
---|
28 | /** |
---|
29 | * @defgroup ClassicTaskMP Classic API Task MP Support |
---|
30 | * |
---|
31 | * This encapsulates functionality which XXX |
---|
32 | */ |
---|
33 | /**@{*/ |
---|
34 | |
---|
35 | #ifdef __cplusplus |
---|
36 | extern "C" { |
---|
37 | #endif |
---|
38 | /** |
---|
39 | * The following enumerated type defines the list of |
---|
40 | * remote task operations. |
---|
41 | */ |
---|
42 | typedef enum { |
---|
43 | RTEMS_TASKS_MP_ANNOUNCE_CREATE = 0, |
---|
44 | RTEMS_TASKS_MP_ANNOUNCE_DELETE = 1, |
---|
45 | RTEMS_TASKS_MP_SUSPEND_REQUEST = 2, |
---|
46 | RTEMS_TASKS_MP_SUSPEND_RESPONSE = 3, |
---|
47 | RTEMS_TASKS_MP_RESUME_REQUEST = 4, |
---|
48 | RTEMS_TASKS_MP_RESUME_RESPONSE = 5, |
---|
49 | RTEMS_TASKS_MP_SET_PRIORITY_REQUEST = 6, |
---|
50 | RTEMS_TASKS_MP_SET_PRIORITY_RESPONSE = 7, |
---|
51 | RTEMS_TASKS_MP_GET_NOTE_REQUEST = 8, |
---|
52 | RTEMS_TASKS_MP_GET_NOTE_RESPONSE = 9, |
---|
53 | RTEMS_TASKS_MP_SET_NOTE_REQUEST = 10, |
---|
54 | RTEMS_TASKS_MP_SET_NOTE_RESPONSE = 11 |
---|
55 | } RTEMS_tasks_MP_Remote_operations; |
---|
56 | |
---|
57 | /** |
---|
58 | * The following data structure defines the packet used to perform |
---|
59 | * remote task operations. |
---|
60 | */ |
---|
61 | typedef struct { |
---|
62 | rtems_packet_prefix Prefix; |
---|
63 | RTEMS_tasks_MP_Remote_operations operation; |
---|
64 | rtems_name name; |
---|
65 | rtems_task_priority the_priority; |
---|
66 | uint32_t notepad; |
---|
67 | uint32_t note; |
---|
68 | } RTEMS_tasks_MP_Packet; |
---|
69 | |
---|
70 | /** |
---|
71 | * @brief _RTEMS_tasks_MP_Send_process_packet |
---|
72 | * |
---|
73 | * This routine performs a remote procedure call so that a |
---|
74 | * process operation can be performed on another node. |
---|
75 | */ |
---|
76 | void _RTEMS_tasks_MP_Send_process_packet ( |
---|
77 | RTEMS_tasks_MP_Remote_operations operation, |
---|
78 | Objects_Id task_id, |
---|
79 | rtems_name name |
---|
80 | ); |
---|
81 | |
---|
82 | /** |
---|
83 | * @brief _RTEMS_tasks_MP_Send_request_packet |
---|
84 | * |
---|
85 | * This routine performs a remote procedure call so that a |
---|
86 | * directive operation can be initiated on another node. |
---|
87 | */ |
---|
88 | rtems_status_code _RTEMS_tasks_MP_Send_request_packet ( |
---|
89 | RTEMS_tasks_MP_Remote_operations operation, |
---|
90 | Objects_Id task_id, |
---|
91 | rtems_task_priority the_priority, |
---|
92 | uint32_t notepad, |
---|
93 | uint32_t note |
---|
94 | ); |
---|
95 | |
---|
96 | /** |
---|
97 | * @brief _RTEMS_tasks_MP_Send_response_packet |
---|
98 | * |
---|
99 | * This routine performs a remote procedure call so that a |
---|
100 | * directive can be performed on another node. |
---|
101 | */ |
---|
102 | void _RTEMS_tasks_MP_Send_response_packet ( |
---|
103 | RTEMS_tasks_MP_Remote_operations operation, |
---|
104 | Thread_Control *the_thread |
---|
105 | ); |
---|
106 | |
---|
107 | /** |
---|
108 | * @brief _RTEMS_tasks_MP_Process_packet |
---|
109 | * |
---|
110 | * This routine performs the actions specific to this package for |
---|
111 | * the request from another node. |
---|
112 | */ |
---|
113 | void _RTEMS_tasks_MP_Process_packet ( |
---|
114 | rtems_packet_prefix *the_packet_prefix |
---|
115 | ); |
---|
116 | |
---|
117 | /** |
---|
118 | * @brief _RTEMS_tasks_MP_Send_object_was_deleted |
---|
119 | * |
---|
120 | * This routine is invoked indirectly by the thread queue |
---|
121 | * when a proxy has been removed from the thread queue and |
---|
122 | * the remote node must be informed of this. |
---|
123 | * |
---|
124 | * This routine is not needed by RTEMS_tasks since a task |
---|
125 | * cannot be deleted when segments are in use. |
---|
126 | */ |
---|
127 | |
---|
128 | /* |
---|
129 | * _RTEMS_tasks_MP_Send_extract_proxy |
---|
130 | * |
---|
131 | * This routine is invoked when a task is deleted and it |
---|
132 | * has a proxy which must be removed from a thread queue and |
---|
133 | * the remote node must be informed of this. |
---|
134 | * |
---|
135 | * This routine is not needed since there are no objects |
---|
136 | * deleted by this manager. |
---|
137 | * |
---|
138 | */ |
---|
139 | |
---|
140 | /** |
---|
141 | * @brief _RTEMS_tasks_MP_Get_packet |
---|
142 | * |
---|
143 | * This function is used to obtain a task mp packet. |
---|
144 | */ |
---|
145 | RTEMS_tasks_MP_Packet *_RTEMS_tasks_MP_Get_packet ( void ); |
---|
146 | |
---|
147 | #ifdef __cplusplus |
---|
148 | } |
---|
149 | #endif |
---|
150 | |
---|
151 | /**@}*/ |
---|
152 | |
---|
153 | #endif |
---|
154 | /* end of file */ |
---|