1 | /* condmp.h |
---|
2 | * |
---|
3 | * This include file contains all the constants and structures associated |
---|
4 | * with the Multiprocessing Support in the POSIX Condition Variable Manager. |
---|
5 | * |
---|
6 | * COPYRIGHT (c) 1989-1997. |
---|
7 | * On-Line Applications Research Corporation (OAR). |
---|
8 | * Copyright assigned to U.S. Government, 1994. |
---|
9 | * |
---|
10 | * The license and distribution terms for this file may be |
---|
11 | * found in the file LICENSE in this distribution or at |
---|
12 | * http://www.OARcorp.com/rtems/license.html. |
---|
13 | * |
---|
14 | * $Id$ |
---|
15 | */ |
---|
16 | |
---|
17 | #ifndef __RTEMS_POSIX_CONDITION_VARIABLES_MP_h |
---|
18 | #define __RTEMS_POSIX_CONDITION_VARIABLES_MP_h |
---|
19 | |
---|
20 | #ifdef __cplusplus |
---|
21 | extern "C" { |
---|
22 | #endif |
---|
23 | |
---|
24 | #include <rtems/score/mppkt.h> |
---|
25 | #include <rtems/score/object.h> |
---|
26 | #include <rtems/score/thread.h> |
---|
27 | #include <rtems/score/watchdog.h> |
---|
28 | |
---|
29 | /* |
---|
30 | * The following enumerated type defines the list of |
---|
31 | * remote condition variable operations. |
---|
32 | */ |
---|
33 | |
---|
34 | typedef enum { |
---|
35 | POSIX_CONDITION_VARIABLES_MP_ANNOUNCE_CREATE = 0, |
---|
36 | POSIX_CONDITION_VARIABLES_MP_ANNOUNCE_DELETE = 1, |
---|
37 | POSIX_CONDITION_VARIABLES_MP_EXTRACT_PROXY = 2, |
---|
38 | POSIX_CONDITION_VARIABLES_MP_OBTAIN_REQUEST = 3, |
---|
39 | POSIX_CONDITION_VARIABLES_MP_OBTAIN_RESPONSE = 4, |
---|
40 | POSIX_CONDITION_VARIABLES_MP_RELEASE_REQUEST = 5, |
---|
41 | POSIX_CONDITION_VARIABLES_MP_RELEASE_RESPONSE = 6, |
---|
42 | } POSIX_Condition_variables_MP_Remote_operations; |
---|
43 | |
---|
44 | /* |
---|
45 | * The following data structure defines the packet used to perform |
---|
46 | * remote condition variable operations. |
---|
47 | */ |
---|
48 | |
---|
49 | typedef struct { |
---|
50 | MP_packet_Prefix Prefix; |
---|
51 | POSIX_Condition_variables_MP_Remote_operations operation; |
---|
52 | Objects_Name name; |
---|
53 | boolean wait; /* XXX options */ |
---|
54 | Objects_Id proxy_id; |
---|
55 | } POSIX_Condition_variables_MP_Packet; |
---|
56 | |
---|
57 | /* |
---|
58 | * _POSIX_Condition_variables_MP_Send_process_packet |
---|
59 | * |
---|
60 | * DESCRIPTION: |
---|
61 | * |
---|
62 | * This routine performs a remote procedure call so that a |
---|
63 | * process operation can be performed on another node. |
---|
64 | */ |
---|
65 | |
---|
66 | void _POSIX_Condition_variables_MP_Send_process_packet ( |
---|
67 | POSIX_Condition_variables_MP_Remote_operations operation, |
---|
68 | Objects_Id condition_variables_id, |
---|
69 | Objects_Name name, |
---|
70 | Objects_Id proxy_id |
---|
71 | ); |
---|
72 | |
---|
73 | /* |
---|
74 | * _POSIX_Condition_variables_MP_Send_request_packet |
---|
75 | * |
---|
76 | * DESCRIPTION: |
---|
77 | * |
---|
78 | * This routine performs a remote procedure call so that a |
---|
79 | * directive operation can be initiated on another node. |
---|
80 | */ |
---|
81 | |
---|
82 | int _POSIX_Condition_variables_MP_Send_request_packet ( |
---|
83 | POSIX_Condition_variables_MP_Remote_operations operation, |
---|
84 | Objects_Id condition_variables_id, |
---|
85 | boolean wait, /* XXX options */ |
---|
86 | Watchdog_Interval timeout |
---|
87 | ); |
---|
88 | |
---|
89 | /* |
---|
90 | * _POSIX_Condition_variables_MP_Send_response_packet |
---|
91 | * |
---|
92 | * DESCRIPTION: |
---|
93 | * |
---|
94 | * This routine performs a remote procedure call so that a |
---|
95 | * directive can be performed on another node. |
---|
96 | */ |
---|
97 | |
---|
98 | void _POSIX_Condition_variables_MP_Send_response_packet ( |
---|
99 | POSIX_Condition_variables_MP_Remote_operations operation, |
---|
100 | Objects_Id condition_variables_id, |
---|
101 | Thread_Control *the_thread |
---|
102 | ); |
---|
103 | |
---|
104 | /* |
---|
105 | * |
---|
106 | * _POSIX_Condition_variables_MP_Process_packet |
---|
107 | * |
---|
108 | * DESCRIPTION: |
---|
109 | * |
---|
110 | * This routine performs the actions specific to this package for |
---|
111 | * the request from another node. |
---|
112 | */ |
---|
113 | |
---|
114 | void _POSIX_Condition_variables_MP_Process_packet ( |
---|
115 | MP_packet_Prefix *the_packet_prefix |
---|
116 | ); |
---|
117 | |
---|
118 | /* |
---|
119 | * _POSIX_Condition_variables_MP_Send_object_was_deleted |
---|
120 | * |
---|
121 | * DESCRIPTION: |
---|
122 | * |
---|
123 | * This routine is invoked indirectly by the thread queue |
---|
124 | * when a proxy has been removed from the thread queue and |
---|
125 | * the remote node must be informed of this. |
---|
126 | */ |
---|
127 | |
---|
128 | void _POSIX_Condition_variables_MP_Send_object_was_deleted ( |
---|
129 | Thread_Control *the_proxy |
---|
130 | ); |
---|
131 | |
---|
132 | /* |
---|
133 | * _POSIX_Condition_variables_MP_Send_extract_proxy |
---|
134 | * |
---|
135 | * DESCRIPTION: |
---|
136 | * |
---|
137 | * This routine is invoked when a task is deleted and it |
---|
138 | * has a proxy which must be removed from a thread queue and |
---|
139 | * the remote node must be informed of this. |
---|
140 | */ |
---|
141 | |
---|
142 | void _POSIX_Condition_variables_MP_Send_extract_proxy ( |
---|
143 | Thread_Control *the_thread |
---|
144 | ); |
---|
145 | |
---|
146 | /* |
---|
147 | * _POSIX_Condition_variables_MP_Get_packet |
---|
148 | * |
---|
149 | * DESCRIPTION: |
---|
150 | * |
---|
151 | * This function is used to obtain a condition variable mp packet. |
---|
152 | */ |
---|
153 | |
---|
154 | POSIX_Condition_variables_MP_Packet |
---|
155 | *_POSIX_Condition_variables_MP_Get_packet ( void ); |
---|
156 | |
---|
157 | #ifdef __cplusplus |
---|
158 | } |
---|
159 | #endif |
---|
160 | |
---|
161 | #endif |
---|
162 | /* end of file */ |
---|