1 | /* |
2 | * IDENTIFICATION: |
3 | * stub generated Tue Apr 9 11:33:39 2019 |
4 | * with a MiG generated by bootstrap_cmds-96.20.2.200.4 |
5 | * OPTIONS: |
6 | * KernelUser |
7 | */ |
8 | #define __MIG_check__Reply__coalition_notification_subsystem__ 1 |
9 | |
10 | #include "coalition_notification.h" |
11 | |
12 | |
13 | #ifndef mig_internal |
14 | #define mig_internal static __inline__ |
15 | #endif /* mig_internal */ |
16 | |
17 | #ifndef mig_external |
18 | #define mig_external |
19 | #endif /* mig_external */ |
20 | |
21 | #if !defined(__MigTypeCheck) && defined(TypeCheck) |
22 | #define __MigTypeCheck TypeCheck /* Legacy setting */ |
23 | #endif /* !defined(__MigTypeCheck) */ |
24 | |
25 | #if !defined(__MigKernelSpecificCode) && defined(_MIG_KERNEL_SPECIFIC_CODE_) |
26 | #define __MigKernelSpecificCode _MIG_KERNEL_SPECIFIC_CODE_ /* Legacy setting */ |
27 | #endif /* !defined(__MigKernelSpecificCode) */ |
28 | |
29 | #ifndef LimitCheck |
30 | #define LimitCheck 0 |
31 | #endif /* LimitCheck */ |
32 | |
33 | #ifndef min |
34 | #define min(a,b) ( ((a) < (b))? (a): (b) ) |
35 | #endif /* min */ |
36 | |
37 | #if !defined(_WALIGN_) |
38 | #define _WALIGN_(x) (((x) + 3) & ~3) |
39 | #endif /* !defined(_WALIGN_) */ |
40 | |
41 | #if !defined(_WALIGNSZ_) |
42 | #define _WALIGNSZ_(x) _WALIGN_(sizeof(x)) |
43 | #endif /* !defined(_WALIGNSZ_) */ |
44 | |
45 | #ifndef UseStaticTemplates |
46 | #define UseStaticTemplates 0 |
47 | #endif /* UseStaticTemplates */ |
48 | |
49 | #ifndef __MachMsgErrorWithTimeout |
50 | #define __MachMsgErrorWithTimeout(_R_) { \ |
51 | switch (_R_) { \ |
52 | case MACH_SEND_INVALID_DATA: \ |
53 | case MACH_SEND_INVALID_DEST: \ |
54 | case MACH_SEND_INVALID_HEADER: \ |
55 | mig_put_reply_port(InP->Head.msgh_reply_port); \ |
56 | break; \ |
57 | case MACH_SEND_TIMED_OUT: \ |
58 | case MACH_RCV_TIMED_OUT: \ |
59 | default: \ |
60 | mig_dealloc_reply_port(InP->Head.msgh_reply_port); \ |
61 | } \ |
62 | } |
63 | #endif /* __MachMsgErrorWithTimeout */ |
64 | |
65 | #ifndef __MachMsgErrorWithoutTimeout |
66 | #define __MachMsgErrorWithoutTimeout(_R_) { \ |
67 | switch (_R_) { \ |
68 | case MACH_SEND_INVALID_DATA: \ |
69 | case MACH_SEND_INVALID_DEST: \ |
70 | case MACH_SEND_INVALID_HEADER: \ |
71 | mig_put_reply_port(InP->Head.msgh_reply_port); \ |
72 | break; \ |
73 | default: \ |
74 | mig_dealloc_reply_port(InP->Head.msgh_reply_port); \ |
75 | } \ |
76 | } |
77 | #endif /* __MachMsgErrorWithoutTimeout */ |
78 | |
79 | #ifndef __DeclareSendRpc |
80 | #define __DeclareSendRpc(_NUM_, _NAME_) |
81 | #endif /* __DeclareSendRpc */ |
82 | |
83 | #ifndef __BeforeSendRpc |
84 | #define __BeforeSendRpc(_NUM_, _NAME_) |
85 | #endif /* __BeforeSendRpc */ |
86 | |
87 | #ifndef __AfterSendRpc |
88 | #define __AfterSendRpc(_NUM_, _NAME_) |
89 | #endif /* __AfterSendRpc */ |
90 | |
91 | #ifndef __DeclareSendSimple |
92 | #define __DeclareSendSimple(_NUM_, _NAME_) |
93 | #endif /* __DeclareSendSimple */ |
94 | |
95 | #ifndef __BeforeSendSimple |
96 | #define __BeforeSendSimple(_NUM_, _NAME_) |
97 | #endif /* __BeforeSendSimple */ |
98 | |
99 | #ifndef __AfterSendSimple |
100 | #define __AfterSendSimple(_NUM_, _NAME_) |
101 | #endif /* __AfterSendSimple */ |
102 | |
103 | #define msgh_request_port msgh_remote_port |
104 | #define msgh_reply_port msgh_local_port |
105 | |
106 | |
107 | |
108 | /* SimpleRoutine coalition_notification */ |
109 | mig_external kern_return_t coalition_notification |
110 | ( |
111 | mach_port_t coalition_port, |
112 | uint64_t id, |
113 | uint32_t flags |
114 | ) |
115 | { |
116 | |
117 | #ifdef __MigPackStructs |
118 | #pragma pack(4) |
119 | #endif |
120 | typedef struct { |
121 | mach_msg_header_t Head; |
122 | NDR_record_t NDR; |
123 | uint64_t id; |
124 | uint32_t flags; |
125 | } Request __attribute__((unused)); |
126 | #ifdef __MigPackStructs |
127 | #pragma pack() |
128 | #endif |
129 | /* |
130 | * typedef struct { |
131 | * mach_msg_header_t Head; |
132 | * NDR_record_t NDR; |
133 | * kern_return_t RetCode; |
134 | * } mig_reply_error_t; |
135 | */ |
136 | |
137 | union { |
138 | Request In; |
139 | } Mess; |
140 | |
141 | Request *InP = &Mess.In; |
142 | |
143 | mach_msg_return_t msg_result; |
144 | |
145 | #ifdef __MIG_check__Reply__coalition_notification_t__defined |
146 | kern_return_t check_result; |
147 | #endif /* __MIG_check__Reply__coalition_notification_t__defined */ |
148 | |
149 | __DeclareSendSimple(5300, "coalition_notification" ) |
150 | |
151 | InP->NDR = NDR_record; |
152 | |
153 | InP->id = id; |
154 | |
155 | InP->flags = flags; |
156 | |
157 | InP->Head.msgh_bits = |
158 | MACH_MSGH_BITS(19, 0); |
159 | /* msgh_size passed as argument */ |
160 | InP->Head.msgh_request_port = coalition_port; |
161 | InP->Head.msgh_reply_port = MACH_PORT_NULL; |
162 | InP->Head.msgh_id = 5300; |
163 | InP->Head.msgh_reserved = 0; |
164 | |
165 | __BeforeSendSimple(5300, "coalition_notification" ) |
166 | #if __MigKernelSpecificCode |
167 | msg_result = mach_msg_send_from_kernel(&InP->Head, (mach_msg_size_t)sizeof(Request)); |
168 | #else |
169 | msg_result = mach_msg(&InP->Head, MACH_SEND_MSG|MACH_MSG_OPTION_NONE, (mach_msg_size_t)sizeof(Request), 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL); |
170 | #endif /* __MigKernelSpecificCode */ |
171 | __AfterSendSimple(5300, "coalition_notification" ) |
172 | return msg_result; |
173 | } |
174 | |