Sync usage with man page.
[netbsd-mini2440.git] / sys / compat / mach / mach_syscallargs.h
blobd11f5d07944e05a634b8f2d364c895dca85714f2
1 /* $NetBSD$ */
3 /*
4 * System call argument lists.
6 * DO NOT EDIT-- this file is automatically generated.
7 * created from NetBSD: syscalls.master,v 1.10 2009/01/13 22:27:43 pooka Exp
8 */
10 #ifndef _MACH_SYS_SYSCALLARGS_H_
11 #define _MACH_SYS_SYSCALLARGS_H_
13 #define MACH_SYS_MAXSYSARGS 9
15 #undef syscallarg
16 #define syscallarg(x) \
17 union { \
18 register_t pad; \
19 struct { x datum; } le; \
20 struct { /* LINTED zero array dimension */ \
21 int8_t pad[ /* CONSTCOND */ \
22 (sizeof (register_t) < sizeof (x)) \
23 ? 0 \
24 : sizeof (register_t) - sizeof (x)]; \
25 x datum; \
26 } be; \
29 #undef check_syscall_args
30 #define check_syscall_args(call) \
31 typedef char call##_check_args[sizeof (struct call##_args) \
32 <= MACH_SYS_MAXSYSARGS * sizeof (register_t) ? 1 : -1];
34 struct mach_sys_msg_trap_args {
35 syscallarg(mach_msg_header_t *) msg;
36 syscallarg(mach_msg_option_t) option;
37 syscallarg(mach_msg_size_t) send_size;
38 syscallarg(mach_msg_size_t) rcv_size;
39 syscallarg(mach_port_name_t) rcv_name;
40 syscallarg(mach_msg_timeout_t) timeout;
41 syscallarg(mach_port_name_t) notify;
43 check_syscall_args(mach_sys_msg_trap)
45 struct mach_sys_msg_overwrite_trap_args {
46 syscallarg(mach_msg_header_t *) msg;
47 syscallarg(mach_msg_option_t) option;
48 syscallarg(mach_msg_size_t) send_size;
49 syscallarg(mach_msg_size_t) rcv_size;
50 syscallarg(mach_port_name_t) rcv_name;
51 syscallarg(mach_msg_timeout_t) timeout;
52 syscallarg(mach_port_name_t) notify;
53 syscallarg(mach_msg_header_t *) rcv_msg;
54 syscallarg(mach_msg_size_t) scatter_list_size;
56 check_syscall_args(mach_sys_msg_overwrite_trap)
58 struct mach_sys_semaphore_signal_trap_args {
59 syscallarg(mach_port_name_t) signal_name;
61 check_syscall_args(mach_sys_semaphore_signal_trap)
63 struct mach_sys_semaphore_signal_all_trap_args {
64 syscallarg(mach_port_name_t) signal_name;
66 check_syscall_args(mach_sys_semaphore_signal_all_trap)
68 struct mach_sys_semaphore_signal_thread_trap_args {
69 syscallarg(mach_port_name_t) signal_name;
70 syscallarg(mach_port_name_t) thread;
72 check_syscall_args(mach_sys_semaphore_signal_thread_trap)
74 struct mach_sys_semaphore_wait_trap_args {
75 syscallarg(mach_port_name_t) wait_name;
77 check_syscall_args(mach_sys_semaphore_wait_trap)
79 struct mach_sys_semaphore_wait_signal_trap_args {
80 syscallarg(mach_port_name_t) wait_name;
81 syscallarg(mach_port_name_t) signal_name;
83 check_syscall_args(mach_sys_semaphore_wait_signal_trap)
85 struct mach_sys_semaphore_timedwait_trap_args {
86 syscallarg(mach_port_name_t) wait_name;
87 syscallarg(unsigned int) sec;
88 syscallarg(mach_clock_res_t) nsec;
90 check_syscall_args(mach_sys_semaphore_timedwait_trap)
92 struct mach_sys_semaphore_timedwait_signal_trap_args {
93 syscallarg(mach_port_name_t) wait_name;
94 syscallarg(mach_port_name_t) signal_name;
95 syscallarg(unsigned int) sec;
96 syscallarg(mach_clock_res_t) nsec;
98 check_syscall_args(mach_sys_semaphore_timedwait_signal_trap)
100 struct mach_sys_map_fd_args {
101 syscallarg(int) fd;
102 syscallarg(mach_vm_offset_t) offset;
103 syscallarg(mach_vm_offset_t *) va;
104 syscallarg(mach_boolean_t) findspace;
105 syscallarg(mach_vm_size_t) size;
107 check_syscall_args(mach_sys_map_fd)
109 struct mach_sys_task_for_pid_args {
110 syscallarg(mach_port_t) target_tport;
111 syscallarg(int) pid;
112 syscallarg(mach_port_t *) t;
114 check_syscall_args(mach_sys_task_for_pid)
116 struct mach_sys_pid_for_task_args {
117 syscallarg(mach_port_t) t;
118 syscallarg(int *) x;
120 check_syscall_args(mach_sys_pid_for_task)
122 struct mach_sys_macx_swapon_args {
123 syscallarg(char *) name;
124 syscallarg(int) flags;
125 syscallarg(int) size;
126 syscallarg(int) priority;
128 check_syscall_args(mach_sys_macx_swapon)
130 struct mach_sys_macx_swapoff_args {
131 syscallarg(char *) name;
132 syscallarg(int) flags;
134 check_syscall_args(mach_sys_macx_swapoff)
136 struct mach_sys_macx_triggers_args {
137 syscallarg(int) hi_water;
138 syscallarg(int) low_water;
139 syscallarg(int) flags;
140 syscallarg(mach_port_t) alert_port;
142 check_syscall_args(mach_sys_macx_triggers)
144 struct mach_sys_swtch_pri_args {
145 syscallarg(int) pri;
147 check_syscall_args(mach_sys_swtch_pri)
149 struct mach_sys_syscall_thread_switch_args {
150 syscallarg(mach_port_name_t) thread_name;
151 syscallarg(int) option;
152 syscallarg(mach_msg_timeout_t) option_time;
154 check_syscall_args(mach_sys_syscall_thread_switch)
156 struct mach_sys_clock_sleep_trap_args {
157 syscallarg(mach_port_name_t) clock_name;
158 syscallarg(mach_sleep_type_t) sleep_type;
159 syscallarg(int) sleep_sec;
160 syscallarg(int) sleep_nsec;
161 syscallarg(mach_timespec_t *) wakeup_time;
163 check_syscall_args(mach_sys_clock_sleep_trap)
165 struct mach_sys_timebase_info_args {
166 syscallarg(mach_timebase_info_t) info;
168 check_syscall_args(mach_sys_timebase_info)
170 struct mach_sys_wait_until_args {
171 syscallarg(u_int64_t) deadline;
173 check_syscall_args(mach_sys_wait_until)
175 struct mach_sys_timer_destroy_args {
176 syscallarg(mach_port_name_t) name;
178 check_syscall_args(mach_sys_timer_destroy)
180 struct mach_sys_timer_arm_args {
181 syscallarg(mach_port_name_t) name;
182 syscallarg(mach_absolute_time_t) expire_time;
184 check_syscall_args(mach_sys_timer_arm)
186 struct mach_sys_timer_cancel_args {
187 syscallarg(mach_port_name_t) name;
188 syscallarg(mach_absolute_time_t *) result_time;
190 check_syscall_args(mach_sys_timer_cancel)
193 * System call prototypes.
196 int mach_sys_reply_port(struct lwp *, const void *, register_t *);
198 int mach_sys_thread_self_trap(struct lwp *, const void *, register_t *);
200 int mach_sys_task_self_trap(struct lwp *, const void *, register_t *);
202 int mach_sys_host_self_trap(struct lwp *, const void *, register_t *);
204 int mach_sys_msg_trap(struct lwp *, const struct mach_sys_msg_trap_args *, register_t *);
206 int mach_sys_msg_overwrite_trap(struct lwp *, const struct mach_sys_msg_overwrite_trap_args *, register_t *);
208 int mach_sys_semaphore_signal_trap(struct lwp *, const struct mach_sys_semaphore_signal_trap_args *, register_t *);
210 int mach_sys_semaphore_signal_all_trap(struct lwp *, const struct mach_sys_semaphore_signal_all_trap_args *, register_t *);
212 int mach_sys_semaphore_signal_thread_trap(struct lwp *, const struct mach_sys_semaphore_signal_thread_trap_args *, register_t *);
214 int mach_sys_semaphore_wait_trap(struct lwp *, const struct mach_sys_semaphore_wait_trap_args *, register_t *);
216 int mach_sys_semaphore_wait_signal_trap(struct lwp *, const struct mach_sys_semaphore_wait_signal_trap_args *, register_t *);
218 int mach_sys_semaphore_timedwait_trap(struct lwp *, const struct mach_sys_semaphore_timedwait_trap_args *, register_t *);
220 int mach_sys_semaphore_timedwait_signal_trap(struct lwp *, const struct mach_sys_semaphore_timedwait_signal_trap_args *, register_t *);
222 int mach_sys_init_process(struct lwp *, const void *, register_t *);
224 int mach_sys_map_fd(struct lwp *, const struct mach_sys_map_fd_args *, register_t *);
226 int mach_sys_task_for_pid(struct lwp *, const struct mach_sys_task_for_pid_args *, register_t *);
228 int mach_sys_pid_for_task(struct lwp *, const struct mach_sys_pid_for_task_args *, register_t *);
230 int mach_sys_macx_swapon(struct lwp *, const struct mach_sys_macx_swapon_args *, register_t *);
232 int mach_sys_macx_swapoff(struct lwp *, const struct mach_sys_macx_swapoff_args *, register_t *);
234 int mach_sys_macx_triggers(struct lwp *, const struct mach_sys_macx_triggers_args *, register_t *);
236 int mach_sys_swtch_pri(struct lwp *, const struct mach_sys_swtch_pri_args *, register_t *);
238 int mach_sys_swtch(struct lwp *, const void *, register_t *);
240 int mach_sys_syscall_thread_switch(struct lwp *, const struct mach_sys_syscall_thread_switch_args *, register_t *);
242 int mach_sys_clock_sleep_trap(struct lwp *, const struct mach_sys_clock_sleep_trap_args *, register_t *);
244 int mach_sys_timebase_info(struct lwp *, const struct mach_sys_timebase_info_args *, register_t *);
246 int mach_sys_wait_until(struct lwp *, const struct mach_sys_wait_until_args *, register_t *);
248 int mach_sys_timer_create(struct lwp *, const void *, register_t *);
250 int mach_sys_timer_destroy(struct lwp *, const struct mach_sys_timer_destroy_args *, register_t *);
252 int mach_sys_timer_arm(struct lwp *, const struct mach_sys_timer_arm_args *, register_t *);
254 int mach_sys_timer_cancel(struct lwp *, const struct mach_sys_timer_cancel_args *, register_t *);
256 int mach_sys_get_time_base_info(struct lwp *, const void *, register_t *);
258 #endif /* _MACH_SYS_SYSCALLARGS_H_ */