add a shell that does nothing for now for the mach syscalls.

This commit is contained in:
christos 2001-07-14 02:10:59 +00:00
parent b6639a0e83
commit 6f12096732
12 changed files with 1587 additions and 0 deletions

11
sys/compat/mach/Makefile Normal file
View File

@ -0,0 +1,11 @@
# $NetBSD: Makefile,v 1.1 2001/07/14 02:10:59 christos Exp $
DEP= syscalls.conf syscalls.master ../../kern/makesyscalls.sh
OBJS= mach_sysent.c mach_syscalls.c mach_syscall.h mach_syscallargs.h
${OBJS}: ${DEP}
-mv -f mach_sysent.c mach_sysent.c.bak
-mv -f mach_syscalls.c mach_syscalls.c.bak
-mv -f mach_syscall.h mach_syscall.h.bak
-mv -f mach_syscallargs.h mach_syscallargs.h.bak
sh ../../kern/makesyscalls.sh syscalls.conf syscalls.master

View File

@ -0,0 +1,12 @@
# $NetBSD: files.mach,v 1.1 2001/07/14 02:10:59 christos Exp $
#
# Config file description for machine-independent SVR4 compat code.
# Included by ports that need it.
# ports should define any machine-specific files they need in their
# own file lists.
file compat/mach/mach_syscalls.c compat_mach
file compat/mach/mach_sysent.c compat_mach
file compat/mach/mach_misc.c compat_mach
file compat/mach/mach_exec.c compat_mach

136
sys/compat/mach/mach_exec.c Normal file
View File

@ -0,0 +1,136 @@
/* $NetBSD: mach_exec.c,v 1.1 2001/07/14 02:11:00 christos Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
* All rights reserved.
*
* This code is derived from software contributed to The NetBSD Foundation
* by Christos Zoulas.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the NetBSD
* Foundation, Inc. and its contributors.
* 4. Neither the name of The NetBSD Foundation nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/proc.h>
#include <sys/exec.h>
#include <sys/malloc.h>
#include <sys/syscall.h>
#include <compat/mach/mach_types.h>
#include <compat/mach/mach_exec.h>
extern char sigcode[], esigcode[];
extern struct sysent sysent[];
#ifdef SYSCALL_DEBUG
extern const char * const syscallnames[];
#endif
#ifndef __HAVE_SYSCALL_INTERN
void syscall __P((void));
#else
void mach_syscall_intern __P((struct proc *));
#endif
const struct emul emul_mach = {
"mach",
"/emul/mach",
#ifndef __HAVE_MINIMAL_EMUL
0,
0,
SYS_syscall,
SYS_MAXSYSCALL,
#endif
sysent,
#ifdef SYSCALL_DEBUG
syscallnames,
#else
NULL,
#endif
sendsig,
trapsignal,
sigcode,
esigcode,
NULL,
NULL,
NULL,
#ifdef __HAVE_SYSCALL_INTERN
mach_syscall_intern,
#else
syscall,
#endif
};
/*
* Copy arguments onto the stack in the normal way, but add some
* extra information in case of dynamic binding.
*/
void *
exec_mach_copyargs(struct exec_package *pack, struct ps_strings *arginfo,
void *stack, void *argp)
{
char path[MAXPATHLEN];
size_t len;
size_t zero = 0;
stack = copyargs(pack, arginfo, stack, argp);
if (!stack)
return NULL;
if (copyout(&zero, stack, sizeof(zero)))
return NULL;
stack = (char *)stack + sizeof(zero);
/* do the really stupid thing */
if (copyinstr(pack->ep_name, path, MAXPATHLEN, &len))
return NULL;
if (copyout(path, stack, len))
return NULL;
stack = (char *)stack + len;
len = len % sizeof(zero);
if (len) {
if (copyout(&zero, stack, len))
return NULL;
stack = (char *)stack + len;
}
if (copyout(&zero, stack, sizeof(zero)))
return NULL;
stack = (char *)stack + sizeof(zero);
return stack;
}
int
exec_mach_probe(char **path) {
*path = malloc(strlen(emul_mach.e_path) + 1, M_TEMP, M_WAITOK);
(void)strcpy(*path, emul_mach.e_path);
return 0;
}

View File

@ -0,0 +1,47 @@
/* $NetBSD: mach_exec.h,v 1.1 2001/07/14 02:11:00 christos Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
* All rights reserved.
*
* This code is derived from software contributed to The NetBSD Foundation
* by Christos Zoulas.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the NetBSD
* Foundation, Inc. and its contributors.
* 4. Neither the name of The NetBSD Foundation nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef _MACH_EXEC_H_
#define _MACH_EXEC_H_
void *exec_mach_copyargs __P((struct exec_package *, struct ps_strings *,
void *, void *));
int exec_mach_probe __P((char **));
extern const struct emul emul_mach;
#endif /* !_MACH_EXEC_H_ */

366
sys/compat/mach/mach_misc.c Normal file
View File

@ -0,0 +1,366 @@
/* $NetBSD: mach_misc.c,v 1.1 2001/07/14 02:11:00 christos Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
* All rights reserved.
*
* This code is derived from software contributed to The NetBSD Foundation
* by Christos Zoulas.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the NetBSD
* Foundation, Inc. and its contributors.
* 4. Neither the name of The NetBSD Foundation nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
/*
* MACH compatibility module.
*
* We actually don't implement anything here yet!
*/
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/namei.h>
#include <sys/dirent.h>
#include <sys/proc.h>
#include <sys/file.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/filedesc.h>
#include <sys/ioctl.h>
#include <sys/kernel.h>
#include <sys/malloc.h>
#include <sys/pool.h>
#include <sys/mbuf.h>
#include <sys/mman.h>
#include <sys/mount.h>
#include <sys/resource.h>
#include <sys/resourcevar.h>
#include <sys/socket.h>
#include <sys/vnode.h>
#include <sys/uio.h>
#include <sys/wait.h>
#include <sys/utsname.h>
#include <sys/unistd.h>
#include <sys/times.h>
#include <sys/sem.h>
#include <sys/msg.h>
#include <sys/ptrace.h>
#include <sys/signalvar.h>
#include <netinet/in.h>
#include <sys/syscallargs.h>
#include <miscfs/specfs/specdev.h>
#include <compat/mach/mach_types.h>
#include <compat/mach/mach_syscallargs.h>
int
mach_sys_reply_port(struct proc *p, void *vv, register_t *r) {
*r = 0;
DPRINTF(("mach_sys_reply_port();\n"));
return 0;
}
int
mach_sys_thread_self_trap(struct proc *p, void *v, register_t *r) {
*r = 0;
DPRINTF(("mach_sys_thread_self();\n"));
return 0;
}
int
mach_sys_task_self_trap(struct proc *p, void *v, register_t *r) {
*r = 0;
DPRINTF(("mach_sys_task_self();\n"));
return 0;
}
int
mach_sys_host_self_trap(struct proc *p, void *v, register_t *r) {
*r = 0;
DPRINTF(("mach_sys_host_self();\n"));
return 0;
}
int
mach_sys_msg_overwrite_trap(struct proc *p, void *v, register_t *r) {
*r = 0;
DPRINTF(("mach_sys_msg_overwrite_trap();\n"));
return 0;
}
int
mach_sys_semaphore_signal_trap(struct proc *p, void *v, register_t *r) {
struct mach_sys_semaphore_signal_trap_args *ap = v;
*r = 0;
DPRINTF(("mach_sys_semaphore_signal_trap(0x%x);\n",
SCARG(ap, signal_name)));
return 0;
}
int
mach_sys_semaphore_signal_all_trap(struct proc *p, void *v, register_t *r) {
struct mach_sys_semaphore_signal_all_trap_args *ap = v;
*r = 0;
DPRINTF(("mach_sys_semaphore_signal_all_trap(0x%x);\n",
SCARG(ap, signal_name)));
return 0;
}
int
mach_sys_semaphore_signal_thread_trap(struct proc *p, void *v, register_t *r) {
struct mach_sys_semaphore_signal_thread_trap_args *ap = v;
*r = 0;
DPRINTF(("mach_sys_semaphore_signal_thread_trap(0x%x);\n",
SCARG(ap, signal_name)));
return 0;
}
int
mach_sys_semaphore_wait_trap(struct proc *p, void *v, register_t *r) {
struct mach_sys_semaphore_wait_trap_args *ap = v;
*r = 0;
DPRINTF(("mach_sys_semaphore_wait_trap(0x%x);\n",
SCARG(ap, wait_name)));
return 0;
}
int
mach_sys_semaphore_wait_signal_trap(struct proc *p, void *v, register_t *r) {
struct mach_sys_semaphore_wait_signal_trap_args *ap = v;
*r = 0;
DPRINTF(("mach_sys_semaphore_wait_signal_trap(0x%x, 0x%x);\n",
SCARG(ap, wait_name), SCARG(ap, signal_name)));
return 0;
}
int
mach_sys_semaphore_timedwait_trap(struct proc *p, void *v, register_t *r) {
struct mach_sys_semaphore_timedwait_trap_args *ap = v;
*r = 0;
DPRINTF(("mach_sys_semaphore_timedwait_trap(0x%x, %d, %d);\n",
SCARG(ap, wait_name), SCARG(ap, sec), SCARG(ap, nsec)));
return 0;
}
int
mach_sys_semaphore_timedwait_signal_trap(struct proc *p, void *v, register_t *r)
{
struct mach_sys_semaphore_timedwait_signal_trap_args *ap = v;
*r = 0;
DPRINTF((
"mach_sys_semaphore_timedwait_signal_trap(0x%x, 0x%x, %d, %d);\n",
SCARG(ap, wait_name), SCARG(ap, signal_name), SCARG(ap, sec),
SCARG(ap, nsec)));
return 0;
}
int
mach_sys_init_process(struct proc *p, void *v, register_t *r) {
*r = 0;
DPRINTF(("mach_sys_init_process();\n"));
return 0;
}
int
mach_sys_map_fd(struct proc *p, void *v, register_t *r) {
struct mach_sys_map_fd_args *ap = v;
*r = 0;
DPRINTF(("mach_sys_map_fd(0x%lx, %p, %d, %d);\n",
SCARG(ap, offset), SCARG(ap, va), SCARG(ap, findspace),
SCARG(ap, size)));
return 0;
}
int
mach_sys_task_for_pid(struct proc *p, void *v, register_t *r) {
struct mach_sys_task_for_pid_args *ap = v;
*r = 0;
DPRINTF(("mach_sys_task_for_pid(0x%x, %d, %p);\n",
SCARG(ap, target_tport), SCARG(ap, pid), SCARG(ap, t)));
return 0;
}
int
mach_sys_pid_for_task(struct proc *p, void *v, register_t *r) {
struct mach_sys_pid_for_task_args *ap = v;
*r = 0;
DPRINTF(("mach_sys_pid_for_task(0x%x, %p);\n",
SCARG(ap, t), SCARG(ap, x)));
return 0;
}
int
mach_sys_macx_swapon(struct proc *p, void *v, register_t *r) {
struct mach_sys_macx_swapon_args *ap = v;
*r = 0;
DPRINTF(("mach_sys_macx_swapon(%p, %d, %d, %d);\n",
SCARG(ap, name), SCARG(ap, flags), SCARG(ap, size),
SCARG(ap, priority)));
return 0;
}
int
mach_sys_macx_swapoff(struct proc *p, void *v, register_t *r) {
struct mach_sys_macx_swapoff_args *ap = v;
*r = 0;
DPRINTF(("mach_sys_macx_swapoff(%p, %d);\n",
SCARG(ap, name), SCARG(ap, flags)));
return 0;
}
int
mach_sys_macx_triggers(struct proc *p, void *v, register_t *r) {
struct mach_sys_macx_triggers_args *ap = v;
*r = 0;
DPRINTF(("mach_sys_macx_triggers(%d, %d, %d, 0x%x);\n",
SCARG(ap, hi_water), SCARG(ap, low_water), SCARG(ap, flags),
SCARG(ap, alert_port)));
return 0;
}
int
mach_sys_swtch_pri(struct proc *p, void *v, register_t *r) {
struct mach_sys_swtch_pri_args *ap = v;
*r = 0;
DPRINTF(("mach_sys_swtch_pri(%d);\n",
SCARG(ap, pri)));
return 0;
}
int
mach_sys_swtch(struct proc *p, void *v, register_t *r) {
*r = 0;
DPRINTF(("mach_sys_swtch();\n"));
return 0;
}
int
mach_sys_syscall_thread_switch(struct proc *p, void *v, register_t *r) {
struct mach_sys_syscall_thread_switch_args *ap = v;
*r = 0;
DPRINTF(("mach_sys_syscall_thread_switch(0x%x, %d, %d);\n",
SCARG(ap, thread_name), SCARG(ap, option), SCARG(ap, option_time)));
return 0;
}
int
mach_sys_clock_sleep_trap(struct proc *p, void *v, register_t *r) {
struct mach_sys_clock_sleep_trap_args *ap = v;
*r = 0;
DPRINTF(("mach_sys_sleep_trap(0x%x, %d, %d, %d, %p);\n",
SCARG(ap, clock_name), SCARG(ap, sleep_type),
SCARG(ap, sleep_sec), SCARG(ap, sleep_nsec),
SCARG(ap, wakeup_time)));
return 0;
}
int
mach_sys_timebase_info(struct proc *p, void *v, register_t *r) {
struct mach_sys_timebase_info_args *ap = v;
*r = 0;
DPRINTF(("mach_sys_timebase_info(%p);\n",
&SCARG(ap, info)));
return 0;
}
int
mach_sys_wait_until(struct proc *p, void *v, register_t *r) {
struct mach_sys_wait_until_args *ap = v;
*r = 0;
DPRINTF(("mach_sys_wait_until(%lld);\n",
SCARG(ap, deadline)));
return 0;
}
int
mach_sys_timer_create(struct proc *p, void *v, register_t *r) {
*r = 0;
DPRINTF(("mach_sys_timer_create();\n"));
return 0;
}
int
mach_sys_timer_destroy(struct proc *p, void *v, register_t *r) {
struct mach_sys_timer_destroy_args *ap = v;
*r = 0;
DPRINTF(("mach_sys_timer_destroy(0x%x);\n", SCARG(ap, name)));
return 0;
}
int
mach_sys_timer_arm(struct proc *p, void *v, register_t *r) {
struct mach_sys_timer_arm_args *ap = v;
*r = 0;
DPRINTF(("mach_sys_timer_arm(0x%x, %d);\n",
SCARG(ap, name), SCARG(ap, expire_time)));
return 0;
}
int
mach_sys_timer_cancel(struct proc *p, void *v, register_t *r) {
struct mach_sys_timer_cancel_args *ap = v;
*r = 0;
DPRINTF(("mach_sys_timer_cancel(0x%x, %p);\n",
SCARG(ap, name), SCARG(ap, result_time)));
return 0;
}
int
mach_sys_get_time_base_info(struct proc *p, void *v, register_t *r) {
*r = 0;
DPRINTF(("mach_sys_get_time_base_info();\n"));
return 0;
}

View File

@ -0,0 +1,101 @@
/* $NetBSD: mach_syscall.h,v 1.1 2001/07/14 02:11:00 christos Exp $ */
/*
* System call numbers.
*
* DO NOT EDIT-- this file is automatically generated.
* created from NetBSD: syscalls.master,v 1.51 2001/05/30 11:37:32 mrg Exp
*/
/* syscall: "reply_port" ret: "mach_port_name_t" args: */
#define MACH_SYS_reply_port 26
/* syscall: "thread_self_trap" ret: "mach_port_name_t" args: */
#define MACH_SYS_thread_self_trap 27
/* syscall: "task_self_trap" ret: "mach_port_name_t" args: */
#define MACH_SYS_task_self_trap 28
/* syscall: "host_self_trap" ret: "mach_port_name_t" args: */
#define MACH_SYS_host_self_trap 29
/* syscall: "msg_overwrite_trap" ret: "mach_kern_return_t" args: */
#define MACH_SYS_msg_overwrite_trap 32
/* syscall: "semaphore_signal_trap" ret: "mach_kern_return_t" args: "mach_port_name_t" */
#define MACH_SYS_semaphore_signal_trap 33
/* syscall: "semaphore_signal_all_trap" ret: "mach_kern_return_t" args: "mach_port_name_t" */
#define MACH_SYS_semaphore_signal_all_trap 34
/* syscall: "semaphore_signal_thread_trap" ret: "mach_kern_return_t" args: "mach_port_name_t" */
#define MACH_SYS_semaphore_signal_thread_trap 35
/* syscall: "semaphore_wait_trap" ret: "mach_kern_return_t" args: "mach_port_name_t" */
#define MACH_SYS_semaphore_wait_trap 36
/* syscall: "semaphore_wait_signal_trap" ret: "mach_kern_return_t" args: "mach_port_name_t" "mach_port_name_t" */
#define MACH_SYS_semaphore_wait_signal_trap 37
/* syscall: "semaphore_timedwait_trap" ret: "mach_kern_return_t" args: "mach_port_name_t" "unsigned int" "mach_clock_res_t" */
#define MACH_SYS_semaphore_timedwait_trap 38
/* syscall: "semaphore_timedwait_signal_trap" ret: "mach_kern_return_t" args: "mach_port_name_t" "mach_port_name_t" "unsigned int" "mach_clock_res_t" */
#define MACH_SYS_semaphore_timedwait_signal_trap 39
/* syscall: "init_process" ret: "mach_kern_return_t" args: */
#define MACH_SYS_init_process 41
/* syscall: "map_fd" ret: "mach_kern_return_t" args: "int" "mach_vm_offset_t" "mach_vm_offset_t *" "mach_boolean_t" "mach_vm_size_t" */
#define MACH_SYS_map_fd 43
/* syscall: "task_for_pid" ret: "mach_kern_return_t" args: "mach_port_t" "int" "mach_port_t *" */
#define MACH_SYS_task_for_pid 45
/* syscall: "pid_for_task" ret: "mach_kern_return_t" args: "mach_port_t" "int *" */
#define MACH_SYS_pid_for_task 46
/* syscall: "macx_swapon" ret: "mach_kern_return_t" args: "char *" "int" "int" "int" */
#define MACH_SYS_macx_swapon 48
/* syscall: "macx_swapoff" ret: "mach_kern_return_t" args: "char *" "int" */
#define MACH_SYS_macx_swapoff 49
/* syscall: "macx_triggers" ret: "mach_kern_return_t" args: "int" "int" "int" "mach_port_t" */
#define MACH_SYS_macx_triggers 51
/* syscall: "swtch_pri" ret: "mach_kern_return_t" args: "int" */
#define MACH_SYS_swtch_pri 59
/* syscall: "swtch" ret: "mach_kern_return_t" args: */
#define MACH_SYS_swtch 60
/* syscall: "syscall_thread_switch" ret: "mach_kern_return_t" args: "mach_port_name_t" "int" "mach_msg_timeout_t" */
#define MACH_SYS_syscall_thread_switch 61
/* syscall: "clock_sleep_trap" ret: "mach_kern_return_t" args: "mach_port_name_t" "mach_sleep_type_t" "int" "int" "mach_timespec_t *" */
#define MACH_SYS_clock_sleep_trap 62
/* syscall: "timebase_info" ret: "mach_kern_return_t" args: "mach_timebase_info_t" */
#define MACH_SYS_timebase_info 89
/* syscall: "wait_until" ret: "mach_kern_return_t" args: "u_int64_t" */
#define MACH_SYS_wait_until 90
/* syscall: "timer_create" ret: "mach_port_name_t" args: */
#define MACH_SYS_timer_create 91
/* syscall: "timer_destroy" ret: "mach_kern_return_t" args: "mach_port_name_t" */
#define MACH_SYS_timer_destroy 92
/* syscall: "timer_arm" ret: "mach_kern_return_t" args: "mach_port_name_t" "mach_absolute_time_t" */
#define MACH_SYS_timer_arm 93
/* syscall: "timer_cancel" ret: "mach_kern_return_t" args: "mach_port_name_t" "mach_absolute_time_t *" */
#define MACH_SYS_timer_cancel 94
/* syscall: "get_time_base_info" ret: "mach_kern_return_t" args: */
#define MACH_SYS_get_time_base_info 95
#define MACH_SYS_MAXSYSCALL 128
#define MACH_SYS_NSYSENT 128

View File

@ -0,0 +1,175 @@
/* $NetBSD: mach_syscallargs.h,v 1.1 2001/07/14 02:11:01 christos Exp $ */
/*
* System call argument lists.
*
* DO NOT EDIT-- this file is automatically generated.
* created from NetBSD: syscalls.master,v 1.51 2001/05/30 11:37:32 mrg Exp
*/
#ifndef _MACH_SYS__SYSCALLARGS_H_
#define _MACH_SYS__SYSCALLARGS_H_
#ifdef syscallarg
#undef syscallarg
#endif
#define syscallarg(x) \
union { \
register_t pad; \
struct { x datum; } le; \
struct { \
int8_t pad[ (sizeof (register_t) < sizeof (x)) \
? 0 \
: sizeof (register_t) - sizeof (x)]; \
x datum; \
} be; \
}
struct mach_sys_semaphore_signal_trap_args {
syscallarg(mach_port_name_t) signal_name;
};
struct mach_sys_semaphore_signal_all_trap_args {
syscallarg(mach_port_name_t) signal_name;
};
struct mach_sys_semaphore_signal_thread_trap_args {
syscallarg(mach_port_name_t) signal_name;
};
struct mach_sys_semaphore_wait_trap_args {
syscallarg(mach_port_name_t) wait_name;
};
struct mach_sys_semaphore_wait_signal_trap_args {
syscallarg(mach_port_name_t) wait_name;
syscallarg(mach_port_name_t) signal_name;
};
struct mach_sys_semaphore_timedwait_trap_args {
syscallarg(mach_port_name_t) wait_name;
syscallarg(unsigned int) sec;
syscallarg(mach_clock_res_t) nsec;
};
struct mach_sys_semaphore_timedwait_signal_trap_args {
syscallarg(mach_port_name_t) wait_name;
syscallarg(mach_port_name_t) signal_name;
syscallarg(unsigned int) sec;
syscallarg(mach_clock_res_t) nsec;
};
struct mach_sys_map_fd_args {
syscallarg(int) fd;
syscallarg(mach_vm_offset_t) offset;
syscallarg(mach_vm_offset_t *) va;
syscallarg(mach_boolean_t) findspace;
syscallarg(mach_vm_size_t) size;
};
struct mach_sys_task_for_pid_args {
syscallarg(mach_port_t) target_tport;
syscallarg(int) pid;
syscallarg(mach_port_t *) t;
};
struct mach_sys_pid_for_task_args {
syscallarg(mach_port_t) t;
syscallarg(int *) x;
};
struct mach_sys_macx_swapon_args {
syscallarg(char *) name;
syscallarg(int) flags;
syscallarg(int) size;
syscallarg(int) priority;
};
struct mach_sys_macx_swapoff_args {
syscallarg(char *) name;
syscallarg(int) flags;
};
struct mach_sys_macx_triggers_args {
syscallarg(int) hi_water;
syscallarg(int) low_water;
syscallarg(int) flags;
syscallarg(mach_port_t) alert_port;
};
struct mach_sys_swtch_pri_args {
syscallarg(int) pri;
};
struct mach_sys_syscall_thread_switch_args {
syscallarg(mach_port_name_t) thread_name;
syscallarg(int) option;
syscallarg(mach_msg_timeout_t) option_time;
};
struct mach_sys_clock_sleep_trap_args {
syscallarg(mach_port_name_t) clock_name;
syscallarg(mach_sleep_type_t) sleep_type;
syscallarg(int) sleep_sec;
syscallarg(int) sleep_nsec;
syscallarg(mach_timespec_t *) wakeup_time;
};
struct mach_sys_timebase_info_args {
syscallarg(mach_timebase_info_t) info;
};
struct mach_sys_wait_until_args {
syscallarg(u_int64_t) deadline;
};
struct mach_sys_timer_destroy_args {
syscallarg(mach_port_name_t) name;
};
struct mach_sys_timer_arm_args {
syscallarg(mach_port_name_t) name;
syscallarg(mach_absolute_time_t) expire_time;
};
struct mach_sys_timer_cancel_args {
syscallarg(mach_port_name_t) name;
syscallarg(mach_absolute_time_t *) result_time;
};
/*
* System call prototypes.
*/
int mach_sys_reply_port(struct proc *, void *, register_t *);
int mach_sys_thread_self_trap(struct proc *, void *, register_t *);
int mach_sys_task_self_trap(struct proc *, void *, register_t *);
int mach_sys_host_self_trap(struct proc *, void *, register_t *);
int mach_sys_msg_overwrite_trap(struct proc *, void *, register_t *);
int mach_sys_semaphore_signal_trap(struct proc *, void *, register_t *);
int mach_sys_semaphore_signal_all_trap(struct proc *, void *, register_t *);
int mach_sys_semaphore_signal_thread_trap(struct proc *, void *, register_t *);
int mach_sys_semaphore_wait_trap(struct proc *, void *, register_t *);
int mach_sys_semaphore_wait_signal_trap(struct proc *, void *, register_t *);
int mach_sys_semaphore_timedwait_trap(struct proc *, void *, register_t *);
int mach_sys_semaphore_timedwait_signal_trap(struct proc *, void *, register_t *);
int mach_sys_init_process(struct proc *, void *, register_t *);
int mach_sys_map_fd(struct proc *, void *, register_t *);
int mach_sys_task_for_pid(struct proc *, void *, register_t *);
int mach_sys_pid_for_task(struct proc *, void *, register_t *);
int mach_sys_macx_swapon(struct proc *, void *, register_t *);
int mach_sys_macx_swapoff(struct proc *, void *, register_t *);
int mach_sys_macx_triggers(struct proc *, void *, register_t *);
int mach_sys_swtch_pri(struct proc *, void *, register_t *);
int mach_sys_swtch(struct proc *, void *, register_t *);
int mach_sys_syscall_thread_switch(struct proc *, void *, register_t *);
int mach_sys_clock_sleep_trap(struct proc *, void *, register_t *);
int mach_sys_timebase_info(struct proc *, void *, register_t *);
int mach_sys_wait_until(struct proc *, void *, register_t *);
int mach_sys_timer_create(struct proc *, void *, register_t *);
int mach_sys_timer_destroy(struct proc *, void *, register_t *);
int mach_sys_timer_arm(struct proc *, void *, register_t *);
int mach_sys_timer_cancel(struct proc *, void *, register_t *);
int mach_sys_get_time_base_info(struct proc *, void *, register_t *);
#endif /* _MACH_SYS__SYSCALLARGS_H_ */

View File

@ -0,0 +1,154 @@
/* $NetBSD: mach_syscalls.c,v 1.1 2001/07/14 02:11:01 christos Exp $ */
/*
* System call names.
*
* DO NOT EDIT-- this file is automatically generated.
* created from NetBSD: syscalls.master,v 1.51 2001/05/30 11:37:32 mrg Exp
*/
#if defined(_KERNEL_OPT)
#if defined(_KERNEL_OPT)
#include "opt_ntp.h"
#include "opt_sysv.h"
#endif
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/signal.h>
#include <sys/mount.h>
#include <sys/poll.h>
#include <sys/syscallargs.h>
#include <compat/mach/mach_types.h>
#include <compat/mach/mach_syscallargs.h>
#endif /* _KERNEL_OPT */
const char *const mach_syscallnames[] = {
"#0 (unimplemented)", /* 0 = unimplemented */
"#1 (unimplemented)", /* 1 = unimplemented */
"#2 (unimplemented)", /* 2 = unimplemented */
"#3 (unimplemented)", /* 3 = unimplemented */
"#4 (unimplemented)", /* 4 = unimplemented */
"#5 (unimplemented)", /* 5 = unimplemented */
"#6 (unimplemented)", /* 6 = unimplemented */
"#7 (unimplemented)", /* 7 = unimplemented */
"#8 (unimplemented)", /* 8 = unimplemented */
"#9 (unimplemented)", /* 9 = unimplemented */
"#10 (unimplemented)", /* 10 = unimplemented */
"#11 (unimplemented)", /* 11 = unimplemented */
"#12 (unimplemented)", /* 12 = unimplemented */
"#13 (unimplemented)", /* 13 = unimplemented */
"#14 (unimplemented)", /* 14 = unimplemented */
"#15 (unimplemented)", /* 15 = unimplemented */
"#16 (unimplemented)", /* 16 = unimplemented */
"#17 (unimplemented)", /* 17 = unimplemented */
"#18 (unimplemented)", /* 18 = unimplemented */
"#19 (unimplemented)", /* 19 = unimplemented */
"#20 (unimplemented)", /* 20 = unimplemented */
"#21 (unimplemented)", /* 21 = unimplemented */
"#22 (unimplemented)", /* 22 = unimplemented */
"#23 (unimplemented)", /* 23 = unimplemented */
"#24 (unimplemented)", /* 24 = unimplemented */
"#25 (unimplemented)", /* 25 = unimplemented */
"reply_port", /* 26 = reply_port */
"thread_self_trap", /* 27 = thread_self_trap */
"task_self_trap", /* 28 = task_self_trap */
"host_self_trap", /* 29 = host_self_trap */
"#30 (unimplemented)", /* 30 = unimplemented */
"#31 (unimplemented)", /* 31 = unimplemented */
"msg_overwrite_trap", /* 32 = msg_overwrite_trap */
"semaphore_signal_trap", /* 33 = semaphore_signal_trap */
"semaphore_signal_all_trap", /* 34 = semaphore_signal_all_trap */
"semaphore_signal_thread_trap", /* 35 = semaphore_signal_thread_trap */
"semaphore_wait_trap", /* 36 = semaphore_wait_trap */
"semaphore_wait_signal_trap", /* 37 = semaphore_wait_signal_trap */
"semaphore_timedwait_trap", /* 38 = semaphore_timedwait_trap */
"semaphore_timedwait_signal_trap", /* 39 = semaphore_timedwait_signal_trap */
"#40 (unimplemented)", /* 40 = unimplemented */
"init_process", /* 41 = init_process */
"#42 (unimplemented)", /* 42 = unimplemented */
"map_fd", /* 43 = map_fd */
"#44 (unimplemented)", /* 44 = unimplemented */
"task_for_pid", /* 45 = task_for_pid */
"pid_for_task", /* 46 = pid_for_task */
"#47 (unimplemented)", /* 47 = unimplemented */
"macx_swapon", /* 48 = macx_swapon */
"macx_swapoff", /* 49 = macx_swapoff */
"#50 (unimplemented)", /* 50 = unimplemented */
"macx_triggers", /* 51 = macx_triggers */
"#52 (unimplemented)", /* 52 = unimplemented */
"#53 (unimplemented)", /* 53 = unimplemented */
"#54 (unimplemented)", /* 54 = unimplemented */
"#55 (unimplemented)", /* 55 = unimplemented */
"#56 (unimplemented)", /* 56 = unimplemented */
"#57 (unimplemented)", /* 57 = unimplemented */
"#58 (unimplemented)", /* 58 = unimplemented */
"swtch_pri", /* 59 = swtch_pri */
"swtch", /* 60 = swtch */
"syscall_thread_switch", /* 61 = syscall_thread_switch */
"clock_sleep_trap", /* 62 = clock_sleep_trap */
"#63 (unimplemented)", /* 63 = unimplemented */
"#64 (unimplemented)", /* 64 = unimplemented */
"#65 (unimplemented)", /* 65 = unimplemented */
"#66 (unimplemented)", /* 66 = unimplemented */
"#67 (unimplemented)", /* 67 = unimplemented */
"#68 (unimplemented)", /* 68 = unimplemented */
"#69 (unimplemented)", /* 69 = unimplemented */
"#70 (unimplemented)", /* 70 = unimplemented */
"#71 (unimplemented)", /* 71 = unimplemented */
"#72 (unimplemented)", /* 72 = unimplemented */
"#73 (unimplemented)", /* 73 = unimplemented */
"#74 (unimplemented)", /* 74 = unimplemented */
"#75 (unimplemented)", /* 75 = unimplemented */
"#76 (unimplemented)", /* 76 = unimplemented */
"#77 (unimplemented)", /* 77 = unimplemented */
"#78 (unimplemented)", /* 78 = unimplemented */
"#79 (unimplemented)", /* 79 = unimplemented */
"#80 (unimplemented)", /* 80 = unimplemented */
"#81 (unimplemented)", /* 81 = unimplemented */
"#82 (unimplemented)", /* 82 = unimplemented */
"#83 (unimplemented)", /* 83 = unimplemented */
"#84 (unimplemented)", /* 84 = unimplemented */
"#85 (unimplemented)", /* 85 = unimplemented */
"#86 (unimplemented)", /* 86 = unimplemented */
"#87 (unimplemented)", /* 87 = unimplemented */
"#88 (unimplemented)", /* 88 = unimplemented */
"timebase_info", /* 89 = timebase_info */
"wait_until", /* 90 = wait_until */
"timer_create", /* 91 = timer_create */
"timer_destroy", /* 92 = timer_destroy */
"timer_arm", /* 93 = timer_arm */
"timer_cancel", /* 94 = timer_cancel */
"get_time_base_info", /* 95 = get_time_base_info */
"#96 (unimplemented)", /* 96 = unimplemented */
"#97 (unimplemented)", /* 97 = unimplemented */
"#98 (unimplemented)", /* 98 = unimplemented */
"#99 (unimplemented)", /* 99 = unimplemented */
"#100 (unimplemented)", /* 100 = unimplemented */
"#101 (unimplemented)", /* 101 = unimplemented */
"#102 (unimplemented)", /* 102 = unimplemented */
"#103 (unimplemented)", /* 103 = unimplemented */
"#104 (unimplemented)", /* 104 = unimplemented */
"#105 (unimplemented)", /* 105 = unimplemented */
"#106 (unimplemented)", /* 106 = unimplemented */
"#107 (unimplemented)", /* 107 = unimplemented */
"#108 (unimplemented)", /* 108 = unimplemented */
"#109 (unimplemented)", /* 109 = unimplemented */
"#110 (unimplemented)", /* 110 = unimplemented */
"#111 (unimplemented)", /* 111 = unimplemented */
"#112 (unimplemented)", /* 112 = unimplemented */
"#113 (unimplemented)", /* 113 = unimplemented */
"#114 (unimplemented)", /* 114 = unimplemented */
"#115 (unimplemented)", /* 115 = unimplemented */
"#116 (unimplemented)", /* 116 = unimplemented */
"#117 (unimplemented)", /* 117 = unimplemented */
"#118 (unimplemented)", /* 118 = unimplemented */
"#119 (unimplemented)", /* 119 = unimplemented */
"#120 (unimplemented)", /* 120 = unimplemented */
"#121 (unimplemented)", /* 121 = unimplemented */
"#122 (unimplemented)", /* 122 = unimplemented */
"#123 (unimplemented)", /* 123 = unimplemented */
"#124 (unimplemented)", /* 124 = unimplemented */
"#125 (unimplemented)", /* 125 = unimplemented */
"#126 (unimplemented)", /* 126 = unimplemented */
"#127 (unimplemented)", /* 127 = unimplemented */
};

View File

@ -0,0 +1,283 @@
/* $NetBSD: mach_sysent.c,v 1.1 2001/07/14 02:11:02 christos Exp $ */
/*
* System call switch table.
*
* DO NOT EDIT-- this file is automatically generated.
* created from NetBSD: syscalls.master,v 1.51 2001/05/30 11:37:32 mrg Exp
*/
#if defined(_KERNEL_OPT)
#include "opt_ntp.h"
#include "opt_sysv.h"
#endif
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/signal.h>
#include <sys/mount.h>
#include <sys/poll.h>
#include <sys/syscallargs.h>
#include <compat/mach/mach_types.h>
#include <compat/mach/mach_syscallargs.h>
#define s(type) sizeof(type)
struct sysent mach_sysent[] = {
{ 0, 0, 0,
sys_nosys }, /* 0 = unimplemented */
{ 0, 0, 0,
sys_nosys }, /* 1 = unimplemented */
{ 0, 0, 0,
sys_nosys }, /* 2 = unimplemented */
{ 0, 0, 0,
sys_nosys }, /* 3 = unimplemented */
{ 0, 0, 0,
sys_nosys }, /* 4 = unimplemented */
{ 0, 0, 0,
sys_nosys }, /* 5 = unimplemented */
{ 0, 0, 0,
sys_nosys }, /* 6 = unimplemented */
{ 0, 0, 0,
sys_nosys }, /* 7 = unimplemented */
{ 0, 0, 0,
sys_nosys }, /* 8 = unimplemented */
{ 0, 0, 0,
sys_nosys }, /* 9 = unimplemented */
{ 0, 0, 0,
sys_nosys }, /* 10 = unimplemented */
{ 0, 0, 0,
sys_nosys }, /* 11 = unimplemented */
{ 0, 0, 0,
sys_nosys }, /* 12 = unimplemented */
{ 0, 0, 0,
sys_nosys }, /* 13 = unimplemented */
{ 0, 0, 0,
sys_nosys }, /* 14 = unimplemented */
{ 0, 0, 0,
sys_nosys }, /* 15 = unimplemented */
{ 0, 0, 0,
sys_nosys }, /* 16 = unimplemented */
{ 0, 0, 0,
sys_nosys }, /* 17 = unimplemented */
{ 0, 0, 0,
sys_nosys }, /* 18 = unimplemented */
{ 0, 0, 0,
sys_nosys }, /* 19 = unimplemented */
{ 0, 0, 0,
sys_nosys }, /* 20 = unimplemented */
{ 0, 0, 0,
sys_nosys }, /* 21 = unimplemented */
{ 0, 0, 0,
sys_nosys }, /* 22 = unimplemented */
{ 0, 0, 0,
sys_nosys }, /* 23 = unimplemented */
{ 0, 0, 0,
sys_nosys }, /* 24 = unimplemented */
{ 0, 0, 0,
sys_nosys }, /* 25 = unimplemented */
{ 0, 0, 0,
mach_sys_reply_port }, /* 26 = reply_port */
{ 0, 0, 0,
mach_sys_thread_self_trap }, /* 27 = thread_self_trap */
{ 0, 0, 0,
mach_sys_task_self_trap }, /* 28 = task_self_trap */
{ 0, 0, 0,
mach_sys_host_self_trap }, /* 29 = host_self_trap */
{ 0, 0, 0,
sys_nosys }, /* 30 = unimplemented */
{ 0, 0, 0,
sys_nosys }, /* 31 = unimplemented */
{ 0, 0, 0,
mach_sys_msg_overwrite_trap }, /* 32 = msg_overwrite_trap */
{ 1, s(struct mach_sys_semaphore_signal_trap_args), 0,
mach_sys_semaphore_signal_trap }, /* 33 = semaphore_signal_trap */
{ 1, s(struct mach_sys_semaphore_signal_all_trap_args), 0,
mach_sys_semaphore_signal_all_trap },/* 34 = semaphore_signal_all_trap */
{ 1, s(struct mach_sys_semaphore_signal_thread_trap_args), 0,
mach_sys_semaphore_signal_thread_trap },/* 35 = semaphore_signal_thread_trap */
{ 1, s(struct mach_sys_semaphore_wait_trap_args), 0,
mach_sys_semaphore_wait_trap }, /* 36 = semaphore_wait_trap */
{ 2, s(struct mach_sys_semaphore_wait_signal_trap_args), 0,
mach_sys_semaphore_wait_signal_trap },/* 37 = semaphore_wait_signal_trap */
{ 3, s(struct mach_sys_semaphore_timedwait_trap_args), 0,
mach_sys_semaphore_timedwait_trap },/* 38 = semaphore_timedwait_trap */
{ 4, s(struct mach_sys_semaphore_timedwait_signal_trap_args), 0,
mach_sys_semaphore_timedwait_signal_trap },/* 39 = semaphore_timedwait_signal_trap */
{ 0, 0, 0,
sys_nosys }, /* 40 = unimplemented */
{ 0, 0, 0,
mach_sys_init_process }, /* 41 = init_process */
{ 0, 0, 0,
sys_nosys }, /* 42 = unimplemented */
{ 5, s(struct mach_sys_map_fd_args), 0,
mach_sys_map_fd }, /* 43 = map_fd */
{ 0, 0, 0,
sys_nosys }, /* 44 = unimplemented */
{ 3, s(struct mach_sys_task_for_pid_args), 0,
mach_sys_task_for_pid }, /* 45 = task_for_pid */
{ 2, s(struct mach_sys_pid_for_task_args), 0,
mach_sys_pid_for_task }, /* 46 = pid_for_task */
{ 0, 0, 0,
sys_nosys }, /* 47 = unimplemented */
{ 4, s(struct mach_sys_macx_swapon_args), 0,
mach_sys_macx_swapon }, /* 48 = macx_swapon */
{ 2, s(struct mach_sys_macx_swapoff_args), 0,
mach_sys_macx_swapoff }, /* 49 = macx_swapoff */
{ 0, 0, 0,
sys_nosys }, /* 50 = unimplemented */
{ 4, s(struct mach_sys_macx_triggers_args), 0,
mach_sys_macx_triggers }, /* 51 = macx_triggers */
{ 0, 0, 0,
sys_nosys }, /* 52 = unimplemented */
{ 0, 0, 0,
sys_nosys }, /* 53 = unimplemented */
{ 0, 0, 0,
sys_nosys }, /* 54 = unimplemented */
{ 0, 0, 0,
sys_nosys }, /* 55 = unimplemented */
{ 0, 0, 0,
sys_nosys }, /* 56 = unimplemented */
{ 0, 0, 0,
sys_nosys }, /* 57 = unimplemented */
{ 0, 0, 0,
sys_nosys }, /* 58 = unimplemented */
{ 1, s(struct mach_sys_swtch_pri_args), 0,
mach_sys_swtch_pri }, /* 59 = swtch_pri */
{ 0, 0, 0,
mach_sys_swtch }, /* 60 = swtch */
{ 3, s(struct mach_sys_syscall_thread_switch_args), 0,
mach_sys_syscall_thread_switch }, /* 61 = syscall_thread_switch */
{ 5, s(struct mach_sys_clock_sleep_trap_args), 0,
mach_sys_clock_sleep_trap }, /* 62 = clock_sleep_trap */
{ 0, 0, 0,
sys_nosys }, /* 63 = unimplemented */
{ 0, 0, 0,
sys_nosys }, /* 64 = unimplemented */
{ 0, 0, 0,
sys_nosys }, /* 65 = unimplemented */
{ 0, 0, 0,
sys_nosys }, /* 66 = unimplemented */
{ 0, 0, 0,
sys_nosys }, /* 67 = unimplemented */
{ 0, 0, 0,
sys_nosys }, /* 68 = unimplemented */
{ 0, 0, 0,
sys_nosys }, /* 69 = unimplemented */
{ 0, 0, 0,
sys_nosys }, /* 70 = unimplemented */
{ 0, 0, 0,
sys_nosys }, /* 71 = unimplemented */
{ 0, 0, 0,
sys_nosys }, /* 72 = unimplemented */
{ 0, 0, 0,
sys_nosys }, /* 73 = unimplemented */
{ 0, 0, 0,
sys_nosys }, /* 74 = unimplemented */
{ 0, 0, 0,
sys_nosys }, /* 75 = unimplemented */
{ 0, 0, 0,
sys_nosys }, /* 76 = unimplemented */
{ 0, 0, 0,
sys_nosys }, /* 77 = unimplemented */
{ 0, 0, 0,
sys_nosys }, /* 78 = unimplemented */
{ 0, 0, 0,
sys_nosys }, /* 79 = unimplemented */
{ 0, 0, 0,
sys_nosys }, /* 80 = unimplemented */
{ 0, 0, 0,
sys_nosys }, /* 81 = unimplemented */
{ 0, 0, 0,
sys_nosys }, /* 82 = unimplemented */
{ 0, 0, 0,
sys_nosys }, /* 83 = unimplemented */
{ 0, 0, 0,
sys_nosys }, /* 84 = unimplemented */
{ 0, 0, 0,
sys_nosys }, /* 85 = unimplemented */
{ 0, 0, 0,
sys_nosys }, /* 86 = unimplemented */
{ 0, 0, 0,
sys_nosys }, /* 87 = unimplemented */
{ 0, 0, 0,
sys_nosys }, /* 88 = unimplemented */
{ 1, s(struct mach_sys_timebase_info_args), 0,
mach_sys_timebase_info }, /* 89 = timebase_info */
{ 1, s(struct mach_sys_wait_until_args), 0,
mach_sys_wait_until }, /* 90 = wait_until */
{ 0, 0, 0,
mach_sys_timer_create }, /* 91 = timer_create */
{ 1, s(struct mach_sys_timer_destroy_args), 0,
mach_sys_timer_destroy }, /* 92 = timer_destroy */
{ 2, s(struct mach_sys_timer_arm_args), 0,
mach_sys_timer_arm }, /* 93 = timer_arm */
{ 2, s(struct mach_sys_timer_cancel_args), 0,
mach_sys_timer_cancel }, /* 94 = timer_cancel */
{ 0, 0, 0,
mach_sys_get_time_base_info }, /* 95 = get_time_base_info */
{ 0, 0, 0,
sys_nosys }, /* 96 = unimplemented */
{ 0, 0, 0,
sys_nosys }, /* 97 = unimplemented */
{ 0, 0, 0,
sys_nosys }, /* 98 = unimplemented */
{ 0, 0, 0,
sys_nosys }, /* 99 = unimplemented */
{ 0, 0, 0,
sys_nosys }, /* 100 = unimplemented */
{ 0, 0, 0,
sys_nosys }, /* 101 = unimplemented */
{ 0, 0, 0,
sys_nosys }, /* 102 = unimplemented */
{ 0, 0, 0,
sys_nosys }, /* 103 = unimplemented */
{ 0, 0, 0,
sys_nosys }, /* 104 = unimplemented */
{ 0, 0, 0,
sys_nosys }, /* 105 = unimplemented */
{ 0, 0, 0,
sys_nosys }, /* 106 = unimplemented */
{ 0, 0, 0,
sys_nosys }, /* 107 = unimplemented */
{ 0, 0, 0,
sys_nosys }, /* 108 = unimplemented */
{ 0, 0, 0,
sys_nosys }, /* 109 = unimplemented */
{ 0, 0, 0,
sys_nosys }, /* 110 = unimplemented */
{ 0, 0, 0,
sys_nosys }, /* 111 = unimplemented */
{ 0, 0, 0,
sys_nosys }, /* 112 = unimplemented */
{ 0, 0, 0,
sys_nosys }, /* 113 = unimplemented */
{ 0, 0, 0,
sys_nosys }, /* 114 = unimplemented */
{ 0, 0, 0,
sys_nosys }, /* 115 = unimplemented */
{ 0, 0, 0,
sys_nosys }, /* 116 = unimplemented */
{ 0, 0, 0,
sys_nosys }, /* 117 = unimplemented */
{ 0, 0, 0,
sys_nosys }, /* 118 = unimplemented */
{ 0, 0, 0,
sys_nosys }, /* 119 = unimplemented */
{ 0, 0, 0,
sys_nosys }, /* 120 = unimplemented */
{ 0, 0, 0,
sys_nosys }, /* 121 = unimplemented */
{ 0, 0, 0,
sys_nosys }, /* 122 = unimplemented */
{ 0, 0, 0,
sys_nosys }, /* 123 = unimplemented */
{ 0, 0, 0,
sys_nosys }, /* 124 = unimplemented */
{ 0, 0, 0,
sys_nosys }, /* 125 = unimplemented */
{ 0, 0, 0,
sys_nosys }, /* 126 = unimplemented */
{ 0, 0, 0,
sys_nosys }, /* 127 = unimplemented */
};

View File

@ -0,0 +1,65 @@
/* $NetBSD: mach_types.h,v 1.1 2001/07/14 02:11:02 christos Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
* All rights reserved.
*
* This code is derived from software contributed to The NetBSD Foundation
* by Christos Zoulas.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the NetBSD
* Foundation, Inc. and its contributors.
* 4. Neither the name of The NetBSD Foundation nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef _MACH_TYPES_H_
#define _MACH_TYPES_H_
typedef int mach_port_t;
typedef int mach_port_name_t;
typedef int mach_kern_return_t;
typedef int mach_clock_res_t;
typedef int mach_boolean_t;
typedef int mach_msg_timeout_t;
typedef int mach_sleep_type_t;
typedef int mach_timespec_t;
typedef int mach_absolute_time_t;
typedef unsigned int mach_vm_size_t;
typedef unsigned long mach_vm_offset_t;
typedef struct {
u_int32_t numer;
u_int32_t denom;
} mach_timebase_info_t;
#ifdef DEBUG_MACH
#define DPRINTF(a) uprintf a
#else
#define DPRINTF(a)
#endif /* DEBUG_MACH */
#endif /* !_MACH_TYPES_H_ */

View File

@ -0,0 +1,13 @@
# $NetBSD: syscalls.conf,v 1.1 2001/07/14 02:11:02 christos Exp $
sysnames="mach_syscalls.c"
sysnumhdr="mach_syscall.h"
syssw="mach_sysent.c"
sysarghdr="mach_syscallargs.h"
compatopts=""
libcompatopts=""
switchname="mach_sysent"
namesname="mach_syscallnames"
constprefix="MACH_SYS_"
nsysent=128

View File

@ -0,0 +1,224 @@
$NetBSD: syscalls.master,v 1.1 2001/07/14 02:11:02 christos Exp $
; @(#)syscalls.master 8.1 (Berkeley) 7/19/93
; NetBSD COMPAT_MACH system call name/number "master" file.
; This is used for the negative mach syscalls.
; (See syscalls.conf to see what it is processed into.)
;
; Fields: number type [type-dependent ...]
; number system call number, must be in order
; type one of STD, OBSOL, UNIMPL, NODEF, NOARGS, or one of
; the compatibility options defined in syscalls.conf.
;
; types:
; STD always included
; OBSOL obsolete, not included in system
; UNIMPL unimplemented, not included in system
; NODEF included, but don't define the syscall number
; NOARGS included, but don't define the syscall args structure
;
; The compat options are defined in the syscalls.conf file, and the
; compat option name is prefixed to the syscall name. Other than
; that, they're like NODEF (for 'compat' options), or STD (for
; 'libcompat' options).
;
; The type-dependent arguments are as follows:
; For STD, NODEF, NOARGS, and compat syscalls:
; { pseudo-proto } [alias]
; For other syscalls:
; [comment]
;
; #ifdef's, etc. may be included, and are copied to the output files.
; #include's are copied to the syscall names and switch definition files only.
#if defined(_KERNEL_OPT)
#include "opt_ntp.h"
#include "opt_sysv.h"
#endif
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/signal.h>
#include <sys/mount.h>
#include <sys/poll.h>
#include <sys/syscallargs.h>
#include <compat/mach/mach_types.h>
#include <compat/mach/mach_syscallargs.h>
%%
0 UNIMPL
1 UNIMPL
2 UNIMPL
3 UNIMPL
4 UNIMPL
5 UNIMPL
6 UNIMPL
7 UNIMPL
8 UNIMPL
9 UNIMPL
10 UNIMPL
11 UNIMPL
12 UNIMPL
13 UNIMPL
14 UNIMPL
15 UNIMPL
16 UNIMPL
17 UNIMPL
18 UNIMPL
19 UNIMPL
20 UNIMPL
21 UNIMPL
22 UNIMPL
23 UNIMPL
24 UNIMPL
25 UNIMPL
26 STD { mach_port_name_t mach_sys_reply_port(void); }
27 STD { mach_port_name_t \
mach_sys_thread_self_trap(void); }
28 STD { mach_port_name_t mach_sys_task_self_trap(void); }
29 STD { mach_port_name_t mach_sys_host_self_trap(void); }
30 UNIMPL
31 UNIMPL
32 STD { mach_kern_return_t mach_sys_msg_overwrite_trap( \
void); }
33 STD { mach_kern_return_t \
mach_sys_semaphore_signal_trap( \
mach_port_name_t signal_name); }
34 STD { mach_kern_return_t \
mach_sys_semaphore_signal_all_trap( \
mach_port_name_t signal_name); }
35 STD { mach_kern_return_t \
mach_sys_semaphore_signal_thread_trap( \
mach_port_name_t signal_name); }
36 STD { mach_kern_return_t \
mach_sys_semaphore_wait_trap( \
mach_port_name_t wait_name); }
37 STD { mach_kern_return_t \
mach_sys_semaphore_wait_signal_trap( \
mach_port_name_t wait_name, \
mach_port_name_t signal_name); }
38 STD { mach_kern_return_t \
mach_sys_semaphore_timedwait_trap( \
mach_port_name_t wait_name, \
unsigned int sec, \
mach_clock_res_t nsec); }
39 STD { mach_kern_return_t \
mach_sys_semaphore_timedwait_signal_trap( \
mach_port_name_t wait_name, \
mach_port_name_t signal_name, \
unsigned int sec, \
mach_clock_res_t nsec); }
40 UNIMPL
41 STD { mach_kern_return_t mach_sys_init_process(void); }
42 UNIMPL
43 STD { mach_kern_return_t mach_sys_map_fd(int fd, \
mach_vm_offset_t offset, mach_vm_offset_t *va, \
mach_boolean_t findspace, mach_vm_size_t size); }
44 UNIMPL
45 STD { mach_kern_return_t mach_sys_task_for_pid( \
mach_port_t target_tport, int pid, \
mach_port_t *t); }
46 STD { mach_kern_return_t mach_sys_pid_for_task( \
mach_port_t t, int *x); }
47 UNIMPL
48 STD { mach_kern_return_t mach_sys_macx_swapon( \
char *name, int flags, int size, int priority); }
49 STD { mach_kern_return_t mach_sys_macx_swapoff( \
char *name, int flags); }
50 UNIMPL
51 STD { mach_kern_return_t mach_sys_macx_triggers( \
int hi_water, int low_water, int flags, \
mach_port_t alert_port); }
52 UNIMPL
53 UNIMPL
54 UNIMPL
55 UNIMPL
56 UNIMPL
57 UNIMPL
58 UNIMPL
59 STD { mach_kern_return_t mach_sys_swtch_pri( \
int pri); }
60 STD { mach_kern_return_t mach_sys_swtch(void); }
61 STD { mach_kern_return_t mach_sys_syscall_thread_switch( \
mach_port_name_t thread_name, \
int option, \
mach_msg_timeout_t option_time); }
62 STD { mach_kern_return_t mach_sys_clock_sleep_trap( \
mach_port_name_t clock_name, \
mach_sleep_type_t sleep_type, \
int sleep_sec, int sleep_nsec, \
mach_timespec_t *wakeup_time); }
63 UNIMPL
64 UNIMPL
65 UNIMPL
66 UNIMPL
67 UNIMPL
68 UNIMPL
69 UNIMPL
70 UNIMPL
71 UNIMPL
72 UNIMPL
73 UNIMPL
74 UNIMPL
75 UNIMPL
76 UNIMPL
77 UNIMPL
78 UNIMPL
79 UNIMPL
80 UNIMPL
81 UNIMPL
82 UNIMPL
83 UNIMPL
84 UNIMPL
85 UNIMPL
86 UNIMPL
87 UNIMPL
88 UNIMPL
89 STD { mach_kern_return_t mach_sys_timebase_info( \
mach_timebase_info_t info); }
90 STD { mach_kern_return_t mach_sys_wait_until( \
u_int64_t deadline); }
91 STD { mach_port_name_t mach_sys_timer_create(void); }
92 STD { mach_kern_return_t mach_sys_timer_destroy( \
mach_port_name_t name); }
93 STD { mach_kern_return_t mach_sys_timer_arm( \
mach_port_name_t name, \
mach_absolute_time_t expire_time); }
94 STD { mach_kern_return_t mach_sys_timer_cancel( \
mach_port_name_t name, \
mach_absolute_time_t *result_time); }
95 STD { mach_kern_return_t mach_sys_get_time_base_info(void); }
96 UNIMPL
97 UNIMPL
98 UNIMPL
99 UNIMPL
100 UNIMPL
101 UNIMPL
102 UNIMPL
103 UNIMPL
104 UNIMPL
105 UNIMPL
106 UNIMPL
107 UNIMPL
108 UNIMPL
109 UNIMPL
110 UNIMPL
111 UNIMPL
112 UNIMPL
113 UNIMPL
114 UNIMPL
115 UNIMPL
116 UNIMPL
117 UNIMPL
118 UNIMPL
119 UNIMPL
120 UNIMPL
121 UNIMPL
122 UNIMPL
123 UNIMPL
124 UNIMPL
125 UNIMPL
126 UNIMPL
127 UNIMPL