Root/
Source at commit 1146 created 12 years 11 months ago. By azimutz, Sync with trunk (r1145). Add nVidia dev id's, 0DF4 for "GeForce GT 450M" (issue 99) and 1251 for "GeForce GTX 560M" (thanks to oSxFr33k for testing). | |
---|---|
1 | #ifndef␉_clock_user_␊ |
2 | #define␉_clock_user_␊ |
3 | ␊ |
4 | /* Module clock */␊ |
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␉clock_MSG_COUNT␊ |
29 | #define␉clock_MSG_COUNT␉3␊ |
30 | #endif␉/* clock_MSG_COUNT */␊ |
31 | ␊ |
32 | #include <mach/std_types.h>␊ |
33 | #include <mach/mig.h>␊ |
34 | #include <mach/mach_types.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 clock_get_time */␊ |
46 | #ifdef␉mig_external␊ |
47 | mig_external␊ |
48 | #else␊ |
49 | extern␊ |
50 | #endif␉/* mig_external */␊ |
51 | kern_return_t clock_get_time␊ |
52 | (␊ |
53 | ␉clock_serv_t clock_serv,␊ |
54 | ␉mach_timespec_t *cur_time␊ |
55 | );␊ |
56 | ␊ |
57 | /* Routine clock_get_attributes */␊ |
58 | #ifdef␉mig_external␊ |
59 | mig_external␊ |
60 | #else␊ |
61 | extern␊ |
62 | #endif␉/* mig_external */␊ |
63 | kern_return_t clock_get_attributes␊ |
64 | (␊ |
65 | ␉clock_serv_t clock_serv,␊ |
66 | ␉clock_flavor_t flavor,␊ |
67 | ␉clock_attr_t clock_attr,␊ |
68 | ␉mach_msg_type_number_t *clock_attrCnt␊ |
69 | );␊ |
70 | ␊ |
71 | /* Routine clock_alarm */␊ |
72 | #ifdef␉mig_external␊ |
73 | mig_external␊ |
74 | #else␊ |
75 | extern␊ |
76 | #endif␉/* mig_external */␊ |
77 | kern_return_t clock_alarm␊ |
78 | (␊ |
79 | ␉clock_serv_t clock_serv,␊ |
80 | ␉alarm_type_t alarm_type,␊ |
81 | ␉mach_timespec_t alarm_time,␊ |
82 | ␉clock_reply_t alarm_port␊ |
83 | );␊ |
84 | ␊ |
85 | __END_DECLS␊ |
86 | ␊ |
87 | /********************** Caution **************************/␊ |
88 | /* The following data types should be used to calculate */␊ |
89 | /* maximum message sizes only. The actual message may be */␊ |
90 | /* smaller, and the position of the arguments within the */␊ |
91 | /* message layout may vary from what is presented here. */␊ |
92 | /* For example, if any of the arguments are variable- */␊ |
93 | /* sized, and less than the maximum is sent, the data */␊ |
94 | /* will be packed tight in the actual message to reduce */␊ |
95 | /* the presence of holes. */␊ |
96 | /********************** Caution **************************/␊ |
97 | ␊ |
98 | /* typedefs for all requests */␊ |
99 | ␊ |
100 | #ifndef __Request__clock_subsystem__defined␊ |
101 | #define __Request__clock_subsystem__defined␊ |
102 | ␊ |
103 | #ifdef __MigPackStructs␊ |
104 | #pragma pack(4)␊ |
105 | #endif␊ |
106 | ␉typedef struct {␊ |
107 | ␉␉mach_msg_header_t Head;␊ |
108 | ␉} __Request__clock_get_time_t;␊ |
109 | #ifdef __MigPackStructs␊ |
110 | #pragma pack()␊ |
111 | #endif␊ |
112 | ␊ |
113 | #ifdef __MigPackStructs␊ |
114 | #pragma pack(4)␊ |
115 | #endif␊ |
116 | ␉typedef struct {␊ |
117 | ␉␉mach_msg_header_t Head;␊ |
118 | ␉␉NDR_record_t NDR;␊ |
119 | ␉␉clock_flavor_t flavor;␊ |
120 | ␉␉mach_msg_type_number_t clock_attrCnt;␊ |
121 | ␉} __Request__clock_get_attributes_t;␊ |
122 | #ifdef __MigPackStructs␊ |
123 | #pragma pack()␊ |
124 | #endif␊ |
125 | ␊ |
126 | #ifdef __MigPackStructs␊ |
127 | #pragma pack(4)␊ |
128 | #endif␊ |
129 | ␉typedef struct {␊ |
130 | ␉␉mach_msg_header_t Head;␊ |
131 | ␉␉/* start of the kernel processed data */␊ |
132 | ␉␉mach_msg_body_t msgh_body;␊ |
133 | ␉␉mach_msg_port_descriptor_t alarm_port;␊ |
134 | ␉␉/* end of the kernel processed data */␊ |
135 | ␉␉NDR_record_t NDR;␊ |
136 | ␉␉alarm_type_t alarm_type;␊ |
137 | ␉␉mach_timespec_t alarm_time;␊ |
138 | ␉} __Request__clock_alarm_t;␊ |
139 | #ifdef __MigPackStructs␊ |
140 | #pragma pack()␊ |
141 | #endif␊ |
142 | #endif /* !__Request__clock_subsystem__defined */␊ |
143 | ␊ |
144 | /* union of all requests */␊ |
145 | ␊ |
146 | #ifndef __RequestUnion__clock_subsystem__defined␊ |
147 | #define __RequestUnion__clock_subsystem__defined␊ |
148 | union __RequestUnion__clock_subsystem {␊ |
149 | ␉__Request__clock_get_time_t Request_clock_get_time;␊ |
150 | ␉__Request__clock_get_attributes_t Request_clock_get_attributes;␊ |
151 | ␉__Request__clock_alarm_t Request_clock_alarm;␊ |
152 | };␊ |
153 | #endif /* !__RequestUnion__clock_subsystem__defined */␊ |
154 | /* typedefs for all replies */␊ |
155 | ␊ |
156 | #ifndef __Reply__clock_subsystem__defined␊ |
157 | #define __Reply__clock_subsystem__defined␊ |
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 | ␉␉kern_return_t RetCode;␊ |
166 | ␉␉mach_timespec_t cur_time;␊ |
167 | ␉} __Reply__clock_get_time_t;␊ |
168 | #ifdef __MigPackStructs␊ |
169 | #pragma pack()␊ |
170 | #endif␊ |
171 | ␊ |
172 | #ifdef __MigPackStructs␊ |
173 | #pragma pack(4)␊ |
174 | #endif␊ |
175 | ␉typedef struct {␊ |
176 | ␉␉mach_msg_header_t Head;␊ |
177 | ␉␉NDR_record_t NDR;␊ |
178 | ␉␉kern_return_t RetCode;␊ |
179 | ␉␉mach_msg_type_number_t clock_attrCnt;␊ |
180 | ␉␉int clock_attr[1];␊ |
181 | ␉} __Reply__clock_get_attributes_t;␊ |
182 | #ifdef __MigPackStructs␊ |
183 | #pragma pack()␊ |
184 | #endif␊ |
185 | ␊ |
186 | #ifdef __MigPackStructs␊ |
187 | #pragma pack(4)␊ |
188 | #endif␊ |
189 | ␉typedef struct {␊ |
190 | ␉␉mach_msg_header_t Head;␊ |
191 | ␉␉NDR_record_t NDR;␊ |
192 | ␉␉kern_return_t RetCode;␊ |
193 | ␉} __Reply__clock_alarm_t;␊ |
194 | #ifdef __MigPackStructs␊ |
195 | #pragma pack()␊ |
196 | #endif␊ |
197 | #endif /* !__Reply__clock_subsystem__defined */␊ |
198 | ␊ |
199 | /* union of all replies */␊ |
200 | ␊ |
201 | #ifndef __ReplyUnion__clock_subsystem__defined␊ |
202 | #define __ReplyUnion__clock_subsystem__defined␊ |
203 | union __ReplyUnion__clock_subsystem {␊ |
204 | ␉__Reply__clock_get_time_t Reply_clock_get_time;␊ |
205 | ␉__Reply__clock_get_attributes_t Reply_clock_get_attributes;␊ |
206 | ␉__Reply__clock_alarm_t Reply_clock_alarm;␊ |
207 | };␊ |
208 | #endif /* !__RequestUnion__clock_subsystem__defined */␊ |
209 | ␊ |
210 | #ifndef subsystem_to_name_map_clock␊ |
211 | #define subsystem_to_name_map_clock \␊ |
212 | { "clock_get_time", 1000 },\␊ |
213 | { "clock_get_attributes", 1001 },\␊ |
214 | { "clock_alarm", 1002 }␊ |
215 | #endif␊ |
216 | ␊ |
217 | #ifdef __AfterMigUserHeader␊ |
218 | __AfterMigUserHeader␊ |
219 | #endif /* __AfterMigUserHeader */␊ |
220 | ␊ |
221 | #endif␉ /* _clock_user_ */␊ |
222 |