1 | #ifndef␉_lock_set_user_␊ |
2 | #define␉_lock_set_user_␊ |
3 | ␊ |
4 | /* Module lock_set */␊ |
5 | ␊ |
6 | #include <string.h>␊ |
7 | #include <mach/ndr.h>␊ |
8 | #include <mach/boolean.h>␊ |
9 | #include <mach/kern_return.h>␊ |
10 | #include <mach/notify.h>␊ |
11 | #include <mach/mach_types.h>␊ |
12 | #include <mach/message.h>␊ |
13 | #include <mach/mig_errors.h>␊ |
14 | #include <mach/port.h>␊ |
15 | ␊ |
16 | #ifdef AUTOTEST␊ |
17 | #ifndef FUNCTION_PTR_T␊ |
18 | #define FUNCTION_PTR_T␊ |
19 | typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t);␊ |
20 | typedef struct {␊ |
21 | char *name;␊ |
22 | function_ptr_t function;␊ |
23 | } function_table_entry;␊ |
24 | typedef function_table_entry *function_table_t;␊ |
25 | #endif /* FUNCTION_PTR_T */␊ |
26 | #endif /* AUTOTEST */␊ |
27 | ␊ |
28 | #ifndef␉lock_set_MSG_COUNT␊ |
29 | #define␉lock_set_MSG_COUNT␉6␊ |
30 | #endif␉/* lock_set_MSG_COUNT */␊ |
31 | ␊ |
32 | #include <mach/std_types.h>␊ |
33 | #include <mach/mig.h>␊ |
34 | #include <mach/mig.h>␊ |
35 | #include <mach/mach_types.h>␊ |
36 | ␊ |
37 | #ifdef __BeforeMigUserHeader␊ |
38 | __BeforeMigUserHeader␊ |
39 | #endif /* __BeforeMigUserHeader */␊ |
40 | ␊ |
41 | #include <sys/cdefs.h>␊ |
42 | __BEGIN_DECLS␊ |
43 | ␊ |
44 | ␊ |
45 | /* Routine lock_acquire */␊ |
46 | #ifdef␉mig_external␊ |
47 | mig_external␊ |
48 | #else␊ |
49 | extern␊ |
50 | #endif␉/* mig_external */␊ |
51 | kern_return_t lock_acquire␊ |
52 | (␊ |
53 | ␉lock_set_t lock_set,␊ |
54 | ␉int lock_id␊ |
55 | );␊ |
56 | ␊ |
57 | /* Routine lock_release */␊ |
58 | #ifdef␉mig_external␊ |
59 | mig_external␊ |
60 | #else␊ |
61 | extern␊ |
62 | #endif␉/* mig_external */␊ |
63 | kern_return_t lock_release␊ |
64 | (␊ |
65 | ␉lock_set_t lock_set,␊ |
66 | ␉int lock_id␊ |
67 | );␊ |
68 | ␊ |
69 | /* Routine lock_try */␊ |
70 | #ifdef␉mig_external␊ |
71 | mig_external␊ |
72 | #else␊ |
73 | extern␊ |
74 | #endif␉/* mig_external */␊ |
75 | kern_return_t lock_try␊ |
76 | (␊ |
77 | ␉lock_set_t lock_set,␊ |
78 | ␉int lock_id␊ |
79 | );␊ |
80 | ␊ |
81 | /* Routine lock_make_stable */␊ |
82 | #ifdef␉mig_external␊ |
83 | mig_external␊ |
84 | #else␊ |
85 | extern␊ |
86 | #endif␉/* mig_external */␊ |
87 | kern_return_t lock_make_stable␊ |
88 | (␊ |
89 | ␉lock_set_t lock_set,␊ |
90 | ␉int lock_id␊ |
91 | );␊ |
92 | ␊ |
93 | /* Routine lock_handoff */␊ |
94 | #ifdef␉mig_external␊ |
95 | mig_external␊ |
96 | #else␊ |
97 | extern␊ |
98 | #endif␉/* mig_external */␊ |
99 | kern_return_t lock_handoff␊ |
100 | (␊ |
101 | ␉lock_set_t lock_set,␊ |
102 | ␉int lock_id␊ |
103 | );␊ |
104 | ␊ |
105 | /* Routine lock_handoff_accept */␊ |
106 | #ifdef␉mig_external␊ |
107 | mig_external␊ |
108 | #else␊ |
109 | extern␊ |
110 | #endif␉/* mig_external */␊ |
111 | kern_return_t lock_handoff_accept␊ |
112 | (␊ |
113 | ␉lock_set_t lock_set,␊ |
114 | ␉int lock_id␊ |
115 | );␊ |
116 | ␊ |
117 | __END_DECLS␊ |
118 | ␊ |
119 | /********************** Caution **************************/␊ |
120 | /* The following data types should be used to calculate */␊ |
121 | /* maximum message sizes only. The actual message may be */␊ |
122 | /* smaller, and the position of the arguments within the */␊ |
123 | /* message layout may vary from what is presented here. */␊ |
124 | /* For example, if any of the arguments are variable- */␊ |
125 | /* sized, and less than the maximum is sent, the data */␊ |
126 | /* will be packed tight in the actual message to reduce */␊ |
127 | /* the presence of holes. */␊ |
128 | /********************** Caution **************************/␊ |
129 | ␊ |
130 | /* typedefs for all requests */␊ |
131 | ␊ |
132 | #ifndef __Request__lock_set_subsystem__defined␊ |
133 | #define __Request__lock_set_subsystem__defined␊ |
134 | ␊ |
135 | #ifdef __MigPackStructs␊ |
136 | #pragma pack(4)␊ |
137 | #endif␊ |
138 | ␉typedef struct {␊ |
139 | ␉␉mach_msg_header_t Head;␊ |
140 | ␉␉NDR_record_t NDR;␊ |
141 | ␉␉int lock_id;␊ |
142 | ␉} __Request__lock_acquire_t;␊ |
143 | #ifdef __MigPackStructs␊ |
144 | #pragma pack()␊ |
145 | #endif␊ |
146 | ␊ |
147 | #ifdef __MigPackStructs␊ |
148 | #pragma pack(4)␊ |
149 | #endif␊ |
150 | ␉typedef struct {␊ |
151 | ␉␉mach_msg_header_t Head;␊ |
152 | ␉␉NDR_record_t NDR;␊ |
153 | ␉␉int lock_id;␊ |
154 | ␉} __Request__lock_release_t;␊ |
155 | #ifdef __MigPackStructs␊ |
156 | #pragma pack()␊ |
157 | #endif␊ |
158 | ␊ |
159 | #ifdef __MigPackStructs␊ |
160 | #pragma pack(4)␊ |
161 | #endif␊ |
162 | ␉typedef struct {␊ |
163 | ␉␉mach_msg_header_t Head;␊ |
164 | ␉␉NDR_record_t NDR;␊ |
165 | ␉␉int lock_id;␊ |
166 | ␉} __Request__lock_try_t;␊ |
167 | #ifdef __MigPackStructs␊ |
168 | #pragma pack()␊ |
169 | #endif␊ |
170 | ␊ |
171 | #ifdef __MigPackStructs␊ |
172 | #pragma pack(4)␊ |
173 | #endif␊ |
174 | ␉typedef struct {␊ |
175 | ␉␉mach_msg_header_t Head;␊ |
176 | ␉␉NDR_record_t NDR;␊ |
177 | ␉␉int lock_id;␊ |
178 | ␉} __Request__lock_make_stable_t;␊ |
179 | #ifdef __MigPackStructs␊ |
180 | #pragma pack()␊ |
181 | #endif␊ |
182 | ␊ |
183 | #ifdef __MigPackStructs␊ |
184 | #pragma pack(4)␊ |
185 | #endif␊ |
186 | ␉typedef struct {␊ |
187 | ␉␉mach_msg_header_t Head;␊ |
188 | ␉␉NDR_record_t NDR;␊ |
189 | ␉␉int lock_id;␊ |
190 | ␉} __Request__lock_handoff_t;␊ |
191 | #ifdef __MigPackStructs␊ |
192 | #pragma pack()␊ |
193 | #endif␊ |
194 | ␊ |
195 | #ifdef __MigPackStructs␊ |
196 | #pragma pack(4)␊ |
197 | #endif␊ |
198 | ␉typedef struct {␊ |
199 | ␉␉mach_msg_header_t Head;␊ |
200 | ␉␉NDR_record_t NDR;␊ |
201 | ␉␉int lock_id;␊ |
202 | ␉} __Request__lock_handoff_accept_t;␊ |
203 | #ifdef __MigPackStructs␊ |
204 | #pragma pack()␊ |
205 | #endif␊ |
206 | #endif /* !__Request__lock_set_subsystem__defined */␊ |
207 | ␊ |
208 | /* union of all requests */␊ |
209 | ␊ |
210 | #ifndef __RequestUnion__lock_set_subsystem__defined␊ |
211 | #define __RequestUnion__lock_set_subsystem__defined␊ |
212 | union __RequestUnion__lock_set_subsystem {␊ |
213 | ␉__Request__lock_acquire_t Request_lock_acquire;␊ |
214 | ␉__Request__lock_release_t Request_lock_release;␊ |
215 | ␉__Request__lock_try_t Request_lock_try;␊ |
216 | ␉__Request__lock_make_stable_t Request_lock_make_stable;␊ |
217 | ␉__Request__lock_handoff_t Request_lock_handoff;␊ |
218 | ␉__Request__lock_handoff_accept_t Request_lock_handoff_accept;␊ |
219 | };␊ |
220 | #endif /* !__RequestUnion__lock_set_subsystem__defined */␊ |
221 | /* typedefs for all replies */␊ |
222 | ␊ |
223 | #ifndef __Reply__lock_set_subsystem__defined␊ |
224 | #define __Reply__lock_set_subsystem__defined␊ |
225 | ␊ |
226 | #ifdef __MigPackStructs␊ |
227 | #pragma pack(4)␊ |
228 | #endif␊ |
229 | ␉typedef struct {␊ |
230 | ␉␉mach_msg_header_t Head;␊ |
231 | ␉␉NDR_record_t NDR;␊ |
232 | ␉␉kern_return_t RetCode;␊ |
233 | ␉} __Reply__lock_acquire_t;␊ |
234 | #ifdef __MigPackStructs␊ |
235 | #pragma pack()␊ |
236 | #endif␊ |
237 | ␊ |
238 | #ifdef __MigPackStructs␊ |
239 | #pragma pack(4)␊ |
240 | #endif␊ |
241 | ␉typedef struct {␊ |
242 | ␉␉mach_msg_header_t Head;␊ |
243 | ␉␉NDR_record_t NDR;␊ |
244 | ␉␉kern_return_t RetCode;␊ |
245 | ␉} __Reply__lock_release_t;␊ |
246 | #ifdef __MigPackStructs␊ |
247 | #pragma pack()␊ |
248 | #endif␊ |
249 | ␊ |
250 | #ifdef __MigPackStructs␊ |
251 | #pragma pack(4)␊ |
252 | #endif␊ |
253 | ␉typedef struct {␊ |
254 | ␉␉mach_msg_header_t Head;␊ |
255 | ␉␉NDR_record_t NDR;␊ |
256 | ␉␉kern_return_t RetCode;␊ |
257 | ␉} __Reply__lock_try_t;␊ |
258 | #ifdef __MigPackStructs␊ |
259 | #pragma pack()␊ |
260 | #endif␊ |
261 | ␊ |
262 | #ifdef __MigPackStructs␊ |
263 | #pragma pack(4)␊ |
264 | #endif␊ |
265 | ␉typedef struct {␊ |
266 | ␉␉mach_msg_header_t Head;␊ |
267 | ␉␉NDR_record_t NDR;␊ |
268 | ␉␉kern_return_t RetCode;␊ |
269 | ␉} __Reply__lock_make_stable_t;␊ |
270 | #ifdef __MigPackStructs␊ |
271 | #pragma pack()␊ |
272 | #endif␊ |
273 | ␊ |
274 | #ifdef __MigPackStructs␊ |
275 | #pragma pack(4)␊ |
276 | #endif␊ |
277 | ␉typedef struct {␊ |
278 | ␉␉mach_msg_header_t Head;␊ |
279 | ␉␉NDR_record_t NDR;␊ |
280 | ␉␉kern_return_t RetCode;␊ |
281 | ␉} __Reply__lock_handoff_t;␊ |
282 | #ifdef __MigPackStructs␊ |
283 | #pragma pack()␊ |
284 | #endif␊ |
285 | ␊ |
286 | #ifdef __MigPackStructs␊ |
287 | #pragma pack(4)␊ |
288 | #endif␊ |
289 | ␉typedef struct {␊ |
290 | ␉␉mach_msg_header_t Head;␊ |
291 | ␉␉NDR_record_t NDR;␊ |
292 | ␉␉kern_return_t RetCode;␊ |
293 | ␉} __Reply__lock_handoff_accept_t;␊ |
294 | #ifdef __MigPackStructs␊ |
295 | #pragma pack()␊ |
296 | #endif␊ |
297 | #endif /* !__Reply__lock_set_subsystem__defined */␊ |
298 | ␊ |
299 | /* union of all replies */␊ |
300 | ␊ |
301 | #ifndef __ReplyUnion__lock_set_subsystem__defined␊ |
302 | #define __ReplyUnion__lock_set_subsystem__defined␊ |
303 | union __ReplyUnion__lock_set_subsystem {␊ |
304 | ␉__Reply__lock_acquire_t Reply_lock_acquire;␊ |
305 | ␉__Reply__lock_release_t Reply_lock_release;␊ |
306 | ␉__Reply__lock_try_t Reply_lock_try;␊ |
307 | ␉__Reply__lock_make_stable_t Reply_lock_make_stable;␊ |
308 | ␉__Reply__lock_handoff_t Reply_lock_handoff;␊ |
309 | ␉__Reply__lock_handoff_accept_t Reply_lock_handoff_accept;␊ |
310 | };␊ |
311 | #endif /* !__RequestUnion__lock_set_subsystem__defined */␊ |
312 | ␊ |
313 | #ifndef subsystem_to_name_map_lock_set␊ |
314 | #define subsystem_to_name_map_lock_set \␊ |
315 | { "lock_acquire", 617000 },\␊ |
316 | { "lock_release", 617001 },\␊ |
317 | { "lock_try", 617002 },\␊ |
318 | { "lock_make_stable", 617003 },\␊ |
319 | { "lock_handoff", 617004 },\␊ |
320 | { "lock_handoff_accept", 617005 }␊ |
321 | #endif␊ |
322 | ␊ |
323 | #ifdef __AfterMigUserHeader␊ |
324 | __AfterMigUserHeader␊ |
325 | #endif /* __AfterMigUserHeader */␊ |
326 | ␊ |
327 | #endif␉ /* _lock_set_user_ */␊ |
328 | |