1 /* $NetBSD: mach_misc.c,v 1.21 2003/12/30 00:15:46 manu 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.21 2003/12/30 00:15:46 manu 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, register_t *r) {
92 #ifdef DEBUG_MACH
93 struct mach_sys_semaphore_timedwait_trap_args *ap = v;
94 #endif
95 *r = 0;
96 DPRINTF(("mach_sys_semaphore_timedwait_trap(0x%x, %d, %d);\n",
97 SCARG(ap, wait_name), SCARG(ap, sec), SCARG(ap, nsec)));
98 return 0;
99 }
100
101
102 int
103 mach_sys_semaphore_timedwait_signal_trap(struct lwp *l, void *v, register_t *r)
104 {
105 #ifdef DEBUG_MACH
106 struct mach_sys_semaphore_timedwait_signal_trap_args *ap = v;
107 #endif
108 *r = 0;
109 DPRINTF((
110 "mach_sys_semaphore_timedwait_signal_trap(0x%x, 0x%x, %d, %d);\n",
111 SCARG(ap, wait_name), SCARG(ap, signal_name), SCARG(ap, sec),
112 SCARG(ap, nsec)));
113 return 0;
114 }
115
116
117 int
118 mach_sys_init_process(struct lwp *l, void *v, register_t *r) {
119 *r = 0;
120 DPRINTF(("mach_sys_init_process();\n"));
121 return 0;
122 }
123
124
125 int
126 mach_sys_pid_for_task(struct lwp *l, void *v, register_t *r) {
127 #ifdef DEBUG_MACH
128 struct mach_sys_pid_for_task_args *ap = v;
129 #endif
130 *r = 0;
131 DPRINTF(("mach_sys_pid_for_task(0x%x, %p);\n",
132 SCARG(ap, t), SCARG(ap, x)));
133 return 0;
134 }
135
136
137 int
138 mach_sys_macx_swapon(struct lwp *l, void *v, register_t *r) {
139 #ifdef DEBUG_MACH
140 struct mach_sys_macx_swapon_args *ap = v;
141 #endif
142 *r = 0;
143 DPRINTF(("mach_sys_macx_swapon(%p, %d, %d, %d);\n",
144 SCARG(ap, name), SCARG(ap, flags), SCARG(ap, size),
145 SCARG(ap, priority)));
146 return 0;
147 }
148
149 int
150 mach_sys_macx_swapoff(struct lwp *l, void *v, register_t *r) {
151 #ifdef DEBUG_MACH
152 struct mach_sys_macx_swapoff_args *ap = v;
153 #endif
154 *r = 0;
155 DPRINTF(("mach_sys_macx_swapoff(%p, %d);\n",
156 SCARG(ap, name), SCARG(ap, flags)));
157 return 0;
158 }
159
160 int
161 mach_sys_macx_triggers(struct lwp *l, void *v, register_t *r) {
162 #ifdef DEBUG_MACH
163 struct mach_sys_macx_triggers_args *ap = v;
164 #endif
165 *r = 0;
166 DPRINTF(("mach_sys_macx_triggers(%d, %d, %d, 0x%x);\n",
167 SCARG(ap, hi_water), SCARG(ap, low_water), SCARG(ap, flags),
168 SCARG(ap, alert_port)));
169 return 0;
170 }
171
172
173 int
174 mach_sys_wait_until(struct lwp *l, void *v, register_t *r) {
175 #ifdef DEBUG_MACH
176 struct mach_sys_wait_until_args *ap = v;
177 #endif
178 *r = 0;
179 DPRINTF(("mach_sys_wait_until(%lld);\n",
180 SCARG(ap, deadline)));
181 return 0;
182 }
183
184
185 int
186 mach_sys_timer_create(struct lwp *l, void *v, register_t *r) {
187 *r = 0;
188 DPRINTF(("mach_sys_timer_create();\n"));
189 return 0;
190 }
191
192
193 int
194 mach_sys_timer_destroy(struct lwp *l, void *v, register_t *r) {
195 #ifdef DEBUG_MACH
196 struct mach_sys_timer_destroy_args *ap = v;
197 #endif
198 *r = 0;
199 DPRINTF(("mach_sys_timer_destroy(0x%x);\n", SCARG(ap, name)));
200 return 0;
201 }
202
203
204 int
205 mach_sys_timer_arm(struct lwp *l, void *v, register_t *r) {
206 #ifdef DEBUG_MACH
207 struct mach_sys_timer_arm_args *ap = v;
208 #endif
209 *r = 0;
210 DPRINTF(("mach_sys_timer_arm(0x%x, %d);\n",
211 SCARG(ap, name), SCARG(ap, expire_time)));
212 return 0;
213 }
214
215
216 int
217 mach_sys_timer_cancel(struct lwp *l, void *v, register_t *r) {
218 #ifdef DEBUG_MACH
219 struct mach_sys_timer_cancel_args *ap = v;
220 #endif
221 *r = 0;
222 DPRINTF(("mach_sys_timer_cancel(0x%x, %p);\n",
223 SCARG(ap, name), SCARG(ap, result_time)));
224 return 0;
225 }
226
227
228 int
229 mach_sys_get_time_base_info(struct lwp *l, void *v, register_t *r) {
230 *r = 0;
231 DPRINTF(("mach_sys_get_time_base_info();\n"));
232 return 0;
233 }
Cache object: c712cc52bc31e2e2e34fc39250403d7d
|