Chameleon

Chameleon Svn Source Tree

Root/branches/Chimera/i386/include/mach/clock.h

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
19typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t);
20typedef struct {
21 char *name;
22 function_ptr_t function;
23} function_table_entry;
24typedef function_table_entry *function_table_t;
25#endif /* FUNCTION_PTR_T */
26#endif /* AUTOTEST */
27
28#ifndefclock_MSG_COUNT
29#defineclock_MSG_COUNT3
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#ifdefmig_external
47mig_external
48#else
49extern
50#endif/* mig_external */
51kern_return_t clock_get_time
52(
53clock_serv_t clock_serv,
54mach_timespec_t *cur_time
55);
56
57/* Routine clock_get_attributes */
58#ifdefmig_external
59mig_external
60#else
61extern
62#endif/* mig_external */
63kern_return_t clock_get_attributes
64(
65clock_serv_t clock_serv,
66clock_flavor_t flavor,
67clock_attr_t clock_attr,
68mach_msg_type_number_t *clock_attrCnt
69);
70
71/* Routine clock_alarm */
72#ifdefmig_external
73mig_external
74#else
75extern
76#endif/* mig_external */
77kern_return_t clock_alarm
78(
79clock_serv_t clock_serv,
80alarm_type_t alarm_type,
81mach_timespec_t alarm_time,
82clock_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
106typedef struct {
107mach_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
116typedef struct {
117mach_msg_header_t Head;
118NDR_record_t NDR;
119clock_flavor_t flavor;
120mach_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
129typedef struct {
130mach_msg_header_t Head;
131/* start of the kernel processed data */
132mach_msg_body_t msgh_body;
133mach_msg_port_descriptor_t alarm_port;
134/* end of the kernel processed data */
135NDR_record_t NDR;
136alarm_type_t alarm_type;
137mach_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
148union __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
162typedef struct {
163mach_msg_header_t Head;
164NDR_record_t NDR;
165kern_return_t RetCode;
166mach_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
175typedef struct {
176mach_msg_header_t Head;
177NDR_record_t NDR;
178kern_return_t RetCode;
179mach_msg_type_number_t clock_attrCnt;
180int 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
189typedef struct {
190mach_msg_header_t Head;
191NDR_record_t NDR;
192kern_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
203union __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

Archive Download this file

Revision: 1340