Chameleon

Chameleon Svn Source Tree

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

Archive Download this file

Revision: 2182