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