1 | /** |
---|
2 | * @file rtems/rtems/taskmp.h |
---|
3 | * |
---|
4 | * @defgroup ClassicTaskMP Task MP Support |
---|
5 | * |
---|
6 | * @ingroup ClassicRTEMS |
---|
7 | * @brief Task Manager MP Support |
---|
8 | * |
---|
9 | * This include file contains all the constants and structures associated |
---|
10 | * with the multiprocessing support in the task manager. |
---|
11 | */ |
---|
12 | |
---|
13 | /* COPYRIGHT (c) 1989-2013. |
---|
14 | * On-Line Applications Research Corporation (OAR). |
---|
15 | * |
---|
16 | * The license and distribution terms for this file may be |
---|
17 | * found in the file LICENSE in this distribution or at |
---|
18 | * http://www.rtems.org/license/LICENSE. |
---|
19 | */ |
---|
20 | |
---|
21 | #ifndef _RTEMS_RTEMS_TASKMP_H |
---|
22 | #define _RTEMS_RTEMS_TASKMP_H |
---|
23 | |
---|
24 | #ifndef _RTEMS_RTEMS_TASKSIMPL_H |
---|
25 | # error "Never use <rtems/rtems/taskmp.h> directly; include <rtems/rtems/tasksimpl.h> instead." |
---|
26 | #endif |
---|
27 | |
---|
28 | #include <rtems/score/mpciimpl.h> |
---|
29 | |
---|
30 | #ifdef __cplusplus |
---|
31 | extern "C" { |
---|
32 | #endif |
---|
33 | |
---|
34 | /** |
---|
35 | * @defgroup ClassicTaskMP Task MP Support |
---|
36 | * |
---|
37 | * @ingroup ClassicMP |
---|
38 | * |
---|
39 | * This encapsulates functionality related to the transparent multiprocessing |
---|
40 | * support within the Classic API Task Manager. |
---|
41 | */ |
---|
42 | /**@{*/ |
---|
43 | |
---|
44 | /** |
---|
45 | * The following enumerated type defines the list of |
---|
46 | * remote task operations. |
---|
47 | */ |
---|
48 | typedef enum { |
---|
49 | RTEMS_TASKS_MP_ANNOUNCE_CREATE = 0, |
---|
50 | RTEMS_TASKS_MP_ANNOUNCE_DELETE = 1, |
---|
51 | RTEMS_TASKS_MP_SUSPEND_REQUEST = 2, |
---|
52 | RTEMS_TASKS_MP_SUSPEND_RESPONSE = 3, |
---|
53 | RTEMS_TASKS_MP_RESUME_REQUEST = 4, |
---|
54 | RTEMS_TASKS_MP_RESUME_RESPONSE = 5, |
---|
55 | RTEMS_TASKS_MP_SET_PRIORITY_REQUEST = 6, |
---|
56 | RTEMS_TASKS_MP_SET_PRIORITY_RESPONSE = 7, |
---|
57 | } RTEMS_tasks_MP_Remote_operations; |
---|
58 | |
---|
59 | /** |
---|
60 | * The following data structure defines the packet used to perform |
---|
61 | * remote task operations. |
---|
62 | */ |
---|
63 | typedef struct { |
---|
64 | rtems_packet_prefix Prefix; |
---|
65 | RTEMS_tasks_MP_Remote_operations operation; |
---|
66 | rtems_name name; |
---|
67 | rtems_task_priority the_priority; |
---|
68 | } RTEMS_tasks_MP_Packet; |
---|
69 | |
---|
70 | /** |
---|
71 | * @brief RTEMS Tasks MP Send Process Packet |
---|
72 | * |
---|
73 | * Multiprocessing Support for the RTEMS Task Manager |
---|
74 | * |
---|
75 | * This routine performs a remote procedure call so that a |
---|
76 | * process operation can be performed on another node. |
---|
77 | */ |
---|
78 | void _RTEMS_tasks_MP_Send_process_packet ( |
---|
79 | RTEMS_tasks_MP_Remote_operations operation, |
---|
80 | Objects_Id task_id, |
---|
81 | rtems_name name |
---|
82 | ); |
---|
83 | |
---|
84 | /** |
---|
85 | * @brief _RTEMS_tasks_MP_Send_request_packet |
---|
86 | * |
---|
87 | * This routine performs a remote procedure call so that a |
---|
88 | * directive operation can be initiated on another node. |
---|
89 | */ |
---|
90 | rtems_status_code _RTEMS_tasks_MP_Send_request_packet ( |
---|
91 | RTEMS_tasks_MP_Remote_operations operation, |
---|
92 | Objects_Id task_id, |
---|
93 | rtems_task_priority the_priority |
---|
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 */ |
---|