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__clock_reply_subsystem__ 1 |
9 | |
10 | #include "clock_reply.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 clock_alarm_reply */ |
109 | mig_external kern_return_t clock_alarm_reply |
110 | ( |
111 | clock_reply_t alarm_port, |
112 | mach_msg_type_name_t alarm_portPoly, |
113 | kern_return_t alarm_code, |
114 | alarm_type_t alarm_type, |
115 | mach_timespec_t alarm_time |
116 | ) |
117 | { |
118 | |
119 | #ifdef __MigPackStructs |
120 | #pragma pack(4) |
121 | #endif |
122 | typedef struct { |
123 | mach_msg_header_t Head; |
124 | NDR_record_t NDR; |
125 | kern_return_t alarm_code; |
126 | alarm_type_t alarm_type; |
127 | mach_timespec_t alarm_time; |
128 | } Request __attribute__((unused)); |
129 | #ifdef __MigPackStructs |
130 | #pragma pack() |
131 | #endif |
132 | /* |
133 | * typedef struct { |
134 | * mach_msg_header_t Head; |
135 | * NDR_record_t NDR; |
136 | * kern_return_t RetCode; |
137 | * } mig_reply_error_t; |
138 | */ |
139 | |
140 | union { |
141 | Request In; |
142 | } Mess; |
143 | |
144 | Request *InP = &Mess.In; |
145 | |
146 | mach_msg_return_t msg_result; |
147 | |
148 | #ifdef __MIG_check__Reply__clock_alarm_reply_t__defined |
149 | kern_return_t check_result; |
150 | #endif /* __MIG_check__Reply__clock_alarm_reply_t__defined */ |
151 | |
152 | __DeclareSendSimple(3125107, "clock_alarm_reply" ) |
153 | |
154 | InP->NDR = NDR_record; |
155 | |
156 | InP->alarm_code = alarm_code; |
157 | |
158 | InP->alarm_type = alarm_type; |
159 | |
160 | InP->alarm_time = alarm_time; |
161 | |
162 | InP->Head.msgh_bits = |
163 | MACH_MSGH_BITS(alarm_portPoly, 0); |
164 | /* msgh_size passed as argument */ |
165 | InP->Head.msgh_request_port = alarm_port; |
166 | InP->Head.msgh_reply_port = MACH_PORT_NULL; |
167 | InP->Head.msgh_id = 3125107; |
168 | InP->Head.msgh_reserved = 0; |
169 | |
170 | __BeforeSendSimple(3125107, "clock_alarm_reply" ) |
171 | #if __MigKernelSpecificCode |
172 | msg_result = mach_msg_send_from_kernel(&InP->Head, (mach_msg_size_t)sizeof(Request)); |
173 | #else |
174 | 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); |
175 | #endif /* __MigKernelSpecificCode */ |
176 | __AfterSendSimple(3125107, "clock_alarm_reply" ) |
177 | return msg_result; |
178 | } |
179 | |