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/* BEGIN MIG_STRNCPY_ZEROFILL CODE */
17
18#if defined(__has_include)
19#if __has_include(<mach/mig_strncpy_zerofill_support.h>)
20#ifndef USING_MIG_STRNCPY_ZEROFILL
21#define USING_MIG_STRNCPY_ZEROFILL
22#endif
23#ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
24#define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
25#ifdef __cplusplus
26extern "C" {
27#endif
28 extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import));
29#ifdef __cplusplus
30}
31#endif
32#endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */
33#endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */
34#endif /* __has_include */
35
36/* END MIG_STRNCPY_ZEROFILL CODE */
37
38
39#ifdef AUTOTEST
40#ifndef FUNCTION_PTR_T
41#define FUNCTION_PTR_T
42typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t);
43typedef struct {
44 char *name;
45 function_ptr_t function;
46} function_table_entry;
47typedef function_table_entry *function_table_t;
48#endif /* FUNCTION_PTR_T */
49#endif /* AUTOTEST */
50
51#ifndef lock_set_MSG_COUNT
52#define lock_set_MSG_COUNT 6
53#endif /* lock_set_MSG_COUNT */
54
55#include <mach/std_types.h>
56#include <mach/mig.h>
57#include <mach/mig.h>
58#include <mach/mach_types.h>
59
60#ifdef __BeforeMigUserHeader
61__BeforeMigUserHeader
62#endif /* __BeforeMigUserHeader */
63
64#include <sys/cdefs.h>
65__BEGIN_DECLS
66
67
68/* Routine lock_acquire */
69#ifdef mig_external
70mig_external
71#else
72extern
73#endif /* mig_external */
74kern_return_t lock_acquire
75(
76 lock_set_t lock_set,
77 int lock_id
78);
79
80/* Routine lock_release */
81#ifdef mig_external
82mig_external
83#else
84extern
85#endif /* mig_external */
86kern_return_t lock_release
87(
88 lock_set_t lock_set,
89 int lock_id
90);
91
92/* Routine lock_try */
93#ifdef mig_external
94mig_external
95#else
96extern
97#endif /* mig_external */
98kern_return_t lock_try
99(
100 lock_set_t lock_set,
101 int lock_id
102);
103
104/* Routine lock_make_stable */
105#ifdef mig_external
106mig_external
107#else
108extern
109#endif /* mig_external */
110kern_return_t lock_make_stable
111(
112 lock_set_t lock_set,
113 int lock_id
114);
115
116/* Routine lock_handoff */
117#ifdef mig_external
118mig_external
119#else
120extern
121#endif /* mig_external */
122kern_return_t lock_handoff
123(
124 lock_set_t lock_set,
125 int lock_id
126);
127
128/* Routine lock_handoff_accept */
129#ifdef mig_external
130mig_external
131#else
132extern
133#endif /* mig_external */
134kern_return_t lock_handoff_accept
135(
136 lock_set_t lock_set,
137 int lock_id
138);
139
140__END_DECLS
141
142/********************** Caution **************************/
143/* The following data types should be used to calculate */
144/* maximum message sizes only. The actual message may be */
145/* smaller, and the position of the arguments within the */
146/* message layout may vary from what is presented here. */
147/* For example, if any of the arguments are variable- */
148/* sized, and less than the maximum is sent, the data */
149/* will be packed tight in the actual message to reduce */
150/* the presence of holes. */
151/********************** Caution **************************/
152
153/* typedefs for all requests */
154
155#ifndef __Request__lock_set_subsystem__defined
156#define __Request__lock_set_subsystem__defined
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_acquire_t __attribute__((unused));
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_release_t __attribute__((unused));
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_try_t __attribute__((unused));
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_make_stable_t __attribute__((unused));
202#ifdef __MigPackStructs
203#pragma pack()
204#endif
205
206#ifdef __MigPackStructs
207#pragma pack(4)
208#endif
209 typedef struct {
210 mach_msg_header_t Head;
211 NDR_record_t NDR;
212 int lock_id;
213 } __Request__lock_handoff_t __attribute__((unused));
214#ifdef __MigPackStructs
215#pragma pack()
216#endif
217
218#ifdef __MigPackStructs
219#pragma pack(4)
220#endif
221 typedef struct {
222 mach_msg_header_t Head;
223 NDR_record_t NDR;
224 int lock_id;
225 } __Request__lock_handoff_accept_t __attribute__((unused));
226#ifdef __MigPackStructs
227#pragma pack()
228#endif
229#endif /* !__Request__lock_set_subsystem__defined */
230
231/* union of all requests */
232
233#ifndef __RequestUnion__lock_set_subsystem__defined
234#define __RequestUnion__lock_set_subsystem__defined
235union __RequestUnion__lock_set_subsystem {
236 __Request__lock_acquire_t Request_lock_acquire;
237 __Request__lock_release_t Request_lock_release;
238 __Request__lock_try_t Request_lock_try;
239 __Request__lock_make_stable_t Request_lock_make_stable;
240 __Request__lock_handoff_t Request_lock_handoff;
241 __Request__lock_handoff_accept_t Request_lock_handoff_accept;
242};
243#endif /* !__RequestUnion__lock_set_subsystem__defined */
244/* typedefs for all replies */
245
246#ifndef __Reply__lock_set_subsystem__defined
247#define __Reply__lock_set_subsystem__defined
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_acquire_t __attribute__((unused));
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_release_t __attribute__((unused));
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_try_t __attribute__((unused));
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_make_stable_t __attribute__((unused));
293#ifdef __MigPackStructs
294#pragma pack()
295#endif
296
297#ifdef __MigPackStructs
298#pragma pack(4)
299#endif
300 typedef struct {
301 mach_msg_header_t Head;
302 NDR_record_t NDR;
303 kern_return_t RetCode;
304 } __Reply__lock_handoff_t __attribute__((unused));
305#ifdef __MigPackStructs
306#pragma pack()
307#endif
308
309#ifdef __MigPackStructs
310#pragma pack(4)
311#endif
312 typedef struct {
313 mach_msg_header_t Head;
314 NDR_record_t NDR;
315 kern_return_t RetCode;
316 } __Reply__lock_handoff_accept_t __attribute__((unused));
317#ifdef __MigPackStructs
318#pragma pack()
319#endif
320#endif /* !__Reply__lock_set_subsystem__defined */
321
322/* union of all replies */
323
324#ifndef __ReplyUnion__lock_set_subsystem__defined
325#define __ReplyUnion__lock_set_subsystem__defined
326union __ReplyUnion__lock_set_subsystem {
327 __Reply__lock_acquire_t Reply_lock_acquire;
328 __Reply__lock_release_t Reply_lock_release;
329 __Reply__lock_try_t Reply_lock_try;
330 __Reply__lock_make_stable_t Reply_lock_make_stable;
331 __Reply__lock_handoff_t Reply_lock_handoff;
332 __Reply__lock_handoff_accept_t Reply_lock_handoff_accept;
333};
334#endif /* !__RequestUnion__lock_set_subsystem__defined */
335
336#ifndef subsystem_to_name_map_lock_set
337#define subsystem_to_name_map_lock_set \
338 { "lock_acquire", 617000 },\
339 { "lock_release", 617001 },\
340 { "lock_try", 617002 },\
341 { "lock_make_stable", 617003 },\
342 { "lock_handoff", 617004 },\
343 { "lock_handoff_accept", 617005 }
344#endif
345
346#ifdef __AfterMigUserHeader
347__AfterMigUserHeader
348#endif /* __AfterMigUserHeader */
349
350#endif /* _lock_set_user_ */
351