1 /* $NetBSD: mach_misc.c,v 1.24 2006/11/16 01:32:44 christos Exp $ */
2
3 /*-
4 * Copyright (c) 2001 The NetBSD Foundation, Inc.
5 * All rights reserved.
6 *
7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Christos Zoulas.
9 *
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions
12 * are met:
13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
15 * 2. Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in the
17 * documentation and/or other materials provided with the distribution.
18 * 3. All advertising materials mentioning features or use of this software
19 * must display the following acknowledgement:
20 * This product includes software developed by the NetBSD
21 * Foundation, Inc. and its contributors.
22 * 4. Neither the name of The NetBSD Foundation nor the names of its
23 * contributors may be used to endorse or promote products derived
24 * from this software without specific prior written permission.
25 *
26 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
27 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
28 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
29 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
30 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
31 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
32 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
33 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
34 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
35 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36 * POSSIBILITY OF SUCH DAMAGE.
37 */
38
39 /*
40 * MACH compatibility module.
41 *
42 * We actually don't implement anything here yet!
43 */
44
45 #include <sys/cdefs.h>
46 __KERNEL_RCSID(0, "$NetBSD: mach_misc.c,v 1.24 2006/11/16 01:32:44 christos Exp $");
47
48 #include <sys/param.h>
49 #include <sys/systm.h>
50 #include <sys/namei.h>
51 #include <sys/dirent.h>
52 #include <sys/proc.h>
53 #include <sys/file.h>
54 #include <sys/stat.h>
55 #include <sys/time.h>
56 #include <sys/filedesc.h>
57 #include <sys/ioctl.h>
58 #include <sys/kernel.h>
59 #include <sys/malloc.h>
60 #include <sys/pool.h>
61 #include <sys/mbuf.h>
62 #include <sys/mman.h>
63 #include <sys/mount.h>
64 #include <sys/resource.h>
65 #include <sys/resourcevar.h>
66 #include <sys/socket.h>
67 #include <sys/vnode.h>
68 #include <sys/uio.h>
69 #include <sys/wait.h>
70 #include <sys/utsname.h>
71 #include <sys/unistd.h>
72 #include <sys/times.h>
73 #include <sys/sem.h>
74 #include <sys/msg.h>
75 #include <sys/ptrace.h>
76 #include <sys/signalvar.h>
77
78 #include <netinet/in.h>
79 #include <sys/sa.h>
80 #include <sys/syscallargs.h>
81
82 #include <miscfs/specfs/specdev.h>
83
84 #include <compat/mach/mach_types.h>
85 #include <compat/mach/mach_message.h>
86 #include <compat/mach/mach_clock.h>
87 #include <compat/mach/mach_syscallargs.h>
88
89
90 int
91 mach_sys_semaphore_timedwait_trap(struct lwp *l, void *v,
92 register_t *r)
93 {
94 #ifdef DEBUG_MACH
95 struct mach_sys_semaphore_timedwait_trap_args *ap = v;
96 #endif
97 *r = 0;
98 DPRINTF(("mach_sys_semaphore_timedwait_trap(0x%x, %d, %d);\n",
99 SCARG(ap, wait_name), SCARG(ap, sec), SCARG(ap, nsec)));
100 return 0;
101 }
102
103
104 int
105 mach_sys_semaphore_timedwait_signal_trap(struct lwp *l, void *v,
106 register_t *r)
107 {
108 #ifdef DEBUG_MACH
109 struct mach_sys_semaphore_timedwait_signal_trap_args *ap = v;
110 #endif
111 *r = 0;
112 DPRINTF((
113 "mach_sys_semaphore_timedwait_signal_trap(0x%x, 0x%x, %d, %d);\n",
114 SCARG(ap, wait_name), SCARG(ap, signal_name), SCARG(ap, sec),
115 SCARG(ap, nsec)));
116 return 0;
117 }
118
119
120 int
121 mach_sys_init_process(struct lwp *l, void *v, register_t *r)
122 {
123 *r = 0;
124 DPRINTF(("mach_sys_init_process();\n"));
125 return 0;
126 }
127
128
129 int
130 mach_sys_pid_for_task(struct lwp *l, void *v, register_t *r)
131 {
132 #ifdef DEBUG_MACH
133 struct mach_sys_pid_for_task_args *ap = v;
134 #endif
135 *r = 0;
136 DPRINTF(("mach_sys_pid_for_task(0x%x, %p);\n",
137 SCARG(ap, t), SCARG(ap, x)));
138 return 0;
139 }
140
141
142 int
143 mach_sys_macx_swapon(struct lwp *l, void *v, register_t *r)
144 {
145 #ifdef DEBUG_MACH
146 struct mach_sys_macx_swapon_args *ap = v;
147 #endif
148 *r = 0;
149 DPRINTF(("mach_sys_macx_swapon(%p, %d, %d, %d);\n",
150 SCARG(ap, name), SCARG(ap, flags), SCARG(ap, size),
151 SCARG(ap, priority)));
152 return 0;
153 }
154
155 int
156 mach_sys_macx_swapoff(struct lwp *l, void *v, register_t *r)
157 {
158 #ifdef DEBUG_MACH
159 struct mach_sys_macx_swapoff_args *ap = v;
160 #endif
161 *r = 0;
162 DPRINTF(("mach_sys_macx_swapoff(%p, %d);\n",
163 SCARG(ap, name), SCARG(ap, flags)));
164 return 0;
165 }
166
167 int
168 mach_sys_macx_triggers(struct lwp *l, void *v, register_t *r)
169 {
170 #ifdef DEBUG_MACH
171 struct mach_sys_macx_triggers_args *ap = v;
172 #endif
173 *r = 0;
174 DPRINTF(("mach_sys_macx_triggers(%d, %d, %d, 0x%x);\n",
175 SCARG(ap, hi_water), SCARG(ap, low_water), SCARG(ap, flags),
176 SCARG(ap, alert_port)));
177 return 0;
178 }
179
180
181 int
182 mach_sys_wait_until(struct lwp *l, void *v, register_t *r)
183 {
184 #ifdef DEBUG_MACH
185 struct mach_sys_wait_until_args *ap = v;
186 #endif
187 *r = 0;
188 DPRINTF(("mach_sys_wait_until(%lld);\n",
189 SCARG(ap, deadline)));
190 return 0;
191 }
192
193
194 int
195 mach_sys_timer_create(struct lwp *l, void *v, register_t *r)
196 {
197 *r = 0;
198 DPRINTF(("mach_sys_timer_create();\n"));
199 return 0;
200 }
201
202
203 int
204 mach_sys_timer_destroy(struct lwp *l, void *v, register_t *r)
205 {
206 #ifdef DEBUG_MACH
207 struct mach_sys_timer_destroy_args *ap = v;
208 #endif
209 *r = 0;
210 DPRINTF(("mach_sys_timer_destroy(0x%x);\n", SCARG(ap, name)));
211 return 0;
212 }
213
214
215 int
216 mach_sys_timer_arm(struct lwp *l, void *v, register_t *r)
217 {
218 #ifdef DEBUG_MACH
219 struct mach_sys_timer_arm_args *ap = v;
220 #endif
221 *r = 0;
222 DPRINTF(("mach_sys_timer_arm(0x%x, %d);\n",
223 SCARG(ap, name), SCARG(ap, expire_time)));
224 return 0;
225 }
226
227
228 int
229 mach_sys_timer_cancel(struct lwp *l, void *v, register_t *r)
230 {
231 #ifdef DEBUG_MACH
232 struct mach_sys_timer_cancel_args *ap = v;
233 #endif
234 *r = 0;
235 DPRINTF(("mach_sys_timer_cancel(0x%x, %p);\n",
236 SCARG(ap, name), SCARG(ap, result_time)));
237 return 0;
238 }
239
240
241 int
242 mach_sys_get_time_base_info(struct lwp *l, void *v,
243 register_t *r)
244 {
245 *r = 0;
246 DPRINTF(("mach_sys_get_time_base_info();\n"));
247 return 0;
248 }
Cache object: ec394f44ac818520474eee6d8075a5b7
|