1 | /** |
---|
2 | * @file rtems/rtems/partmp.h |
---|
3 | * |
---|
4 | * This include file contains all the constants and structures associated |
---|
5 | * with the Multiprocessing Support in the Partition Manager. |
---|
6 | */ |
---|
7 | |
---|
8 | /* COPYRIGHT (c) 1989-2008. |
---|
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_PARTMP_H |
---|
19 | #define _RTEMS_RTEMS_PARTMP_H |
---|
20 | |
---|
21 | #ifdef __cplusplus |
---|
22 | extern "C" { |
---|
23 | #endif |
---|
24 | |
---|
25 | #include <rtems/score/mppkt.h> |
---|
26 | #include <rtems/score/object.h> |
---|
27 | #include <rtems/rtems/options.h> |
---|
28 | #include <rtems/score/thread.h> |
---|
29 | |
---|
30 | #include <rtems/rtems/part.h> |
---|
31 | |
---|
32 | /** |
---|
33 | * @defgroup ClassicPartMP Partition MP Support |
---|
34 | * |
---|
35 | * @ingroup ClassicMP |
---|
36 | * |
---|
37 | * This encapsulates functionality which XXX |
---|
38 | */ |
---|
39 | /**{*/ |
---|
40 | |
---|
41 | /** |
---|
42 | * The following enumerated type defines the list of |
---|
43 | * remote partition operations. |
---|
44 | */ |
---|
45 | typedef enum { |
---|
46 | PARTITION_MP_ANNOUNCE_CREATE = 0, |
---|
47 | PARTITION_MP_ANNOUNCE_DELETE = 1, |
---|
48 | PARTITION_MP_EXTRACT_PROXY = 2, |
---|
49 | PARTITION_MP_GET_BUFFER_REQUEST = 3, |
---|
50 | PARTITION_MP_GET_BUFFER_RESPONSE = 4, |
---|
51 | PARTITION_MP_RETURN_BUFFER_REQUEST = 5, |
---|
52 | PARTITION_MP_RETURN_BUFFER_RESPONSE = 6 |
---|
53 | } Partition_MP_Remote_operations; |
---|
54 | |
---|
55 | /** |
---|
56 | * The following data structure defines the packet used to perform |
---|
57 | * remote partition operations. |
---|
58 | */ |
---|
59 | typedef struct { |
---|
60 | rtems_packet_prefix Prefix; |
---|
61 | Partition_MP_Remote_operations operation; |
---|
62 | rtems_name name; |
---|
63 | void *buffer; |
---|
64 | Objects_Id proxy_id; |
---|
65 | } Partition_MP_Packet; |
---|
66 | |
---|
67 | /** |
---|
68 | * @brief Partition_MP_Send_process_packet |
---|
69 | * |
---|
70 | * This routine performs a remote procedure call so that a |
---|
71 | * process operation can be performed on another node. |
---|
72 | */ |
---|
73 | void _Partition_MP_Send_process_packet ( |
---|
74 | Partition_MP_Remote_operations operation, |
---|
75 | Objects_Id partition_id, |
---|
76 | rtems_name name, |
---|
77 | Objects_Id proxy_id |
---|
78 | ); |
---|
79 | |
---|
80 | /** |
---|
81 | * @brief Partition_MP_Send_request_packet |
---|
82 | * |
---|
83 | * This routine performs a remote procedure call so that a |
---|
84 | * directive operation can be initiated on another node. |
---|
85 | */ |
---|
86 | rtems_status_code _Partition_MP_Send_request_packet ( |
---|
87 | Partition_MP_Remote_operations operation, |
---|
88 | Objects_Id partition_id, |
---|
89 | void *buffer |
---|
90 | ); |
---|
91 | |
---|
92 | /** |
---|
93 | * @brief Partition_MP_Send_response_packet |
---|
94 | * |
---|
95 | * This routine performs a remote procedure call so that a |
---|
96 | * directive can be performed on another node. |
---|
97 | */ |
---|
98 | void _Partition_MP_Send_response_packet ( |
---|
99 | Partition_MP_Remote_operations operation, |
---|
100 | Objects_Id partition_id, |
---|
101 | Thread_Control *the_thread |
---|
102 | ); |
---|
103 | |
---|
104 | /** |
---|
105 | * |
---|
106 | * @brief Partition_MP_Process_packet |
---|
107 | * |
---|
108 | * This routine performs the actions specific to this package for |
---|
109 | * the request from another node. |
---|
110 | */ |
---|
111 | void _Partition_MP_Process_packet ( |
---|
112 | rtems_packet_prefix *the_packet_prefix |
---|
113 | ); |
---|
114 | |
---|
115 | /* |
---|
116 | * @brief Partition_MP_Send_object_was_deleted |
---|
117 | * |
---|
118 | * This routine is invoked indirectly by the thread queue |
---|
119 | * when a proxy has been removed from the thread queue and |
---|
120 | * the remote node must be informed of this. |
---|
121 | * |
---|
122 | * This routine is not needed by the Partition since a partition |
---|
123 | * cannot be deleted when buffers are in use. |
---|
124 | */ |
---|
125 | |
---|
126 | /** |
---|
127 | * @brief Partition_MP_Send_extract_proxy |
---|
128 | * |
---|
129 | * This routine is invoked when a task is deleted and it |
---|
130 | * has a proxy which must be removed from a thread queue and |
---|
131 | * the remote node must be informed of this. |
---|
132 | */ |
---|
133 | void _Partition_MP_Send_extract_proxy ( |
---|
134 | void *argument |
---|
135 | ); |
---|
136 | |
---|
137 | /** |
---|
138 | * @brief Partition_MP_Get_packet |
---|
139 | * |
---|
140 | * This function is used to obtain a partition mp packet. |
---|
141 | */ |
---|
142 | Partition_MP_Packet *_Partition_MP_Get_packet ( void ); |
---|
143 | |
---|
144 | #ifdef __cplusplus |
---|
145 | } |
---|
146 | #endif |
---|
147 | |
---|
148 | /**@}*/ |
---|
149 | |
---|
150 | #endif |
---|
151 | /* end of file */ |
---|