diff --git a/sys/compat/svr4/files.svr4 b/sys/compat/svr4/files.svr4 index 87830c8f5297..22739b25b6d8 100644 --- a/sys/compat/svr4/files.svr4 +++ b/sys/compat/svr4/files.svr4 @@ -1,4 +1,4 @@ -# $NetBSD: files.svr4,v 1.15 2002/03/31 22:22:49 christos Exp $ +# $NetBSD: files.svr4,v 1.16 2006/04/02 06:34:18 macallan Exp $ # # Config file description for machine-independent SVR4 compat code. # Included by ports that need it. @@ -18,6 +18,7 @@ file compat/svr4/svr4_lwp.c compat_svr4 file compat/svr4/svr4_misc.c compat_svr4 file compat/svr4/svr4_net.c compat_svr4 file compat/svr4/svr4_resource.c compat_svr4 +file compat/svr4/svr4_schedctl.c compat_svr4 file compat/svr4/svr4_signal.c compat_svr4 file compat/svr4/svr4_signo.c compat_svr4 file compat/svr4/svr4_socket.c compat_svr4 diff --git a/sys/compat/svr4/svr4_schedctl.c b/sys/compat/svr4/svr4_schedctl.c new file mode 100644 index 000000000000..66ee9995579d --- /dev/null +++ b/sys/compat/svr4/svr4_schedctl.c @@ -0,0 +1,74 @@ +/* $NetBSD: svr4_schedctl.c,v 1.1 2006/04/02 06:34:18 macallan Exp $ */ + +/* + * Copyright (c) 2003 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Dan McMahill. + * + * 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 +__KERNEL_RCSID(0, "$NetBSD: svr4_schedctl.c,v 1.1 2006/04/02 06:34:18 macallan Exp $"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include + +int +svr4_sys_schedctl(struct lwp *l, void *v, register_t *retval) +{ + + return 0; /* XXX */ +} + diff --git a/sys/compat/svr4/svr4_schedctl.h b/sys/compat/svr4/svr4_schedctl.h new file mode 100644 index 000000000000..7e5257b49e6f --- /dev/null +++ b/sys/compat/svr4/svr4_schedctl.h @@ -0,0 +1,47 @@ +/* $NetBSD: svr4_schedctl.h,v 1.1 2006/04/02 06:34:18 macallan Exp $ */ + +/* + * Copyright (c) 2003 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Dan McMahill. + * + * 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 _SVR4_32_SCHEDCTL_H_ +#define _SVR4_32_SCHEDCTL_H_ + +#include + +int svr4_sys_schedctl(struct lwp *, void *, register_t *); + +#endif /* !_SVR4_32_SCHEDCTL_H_ */ + diff --git a/sys/compat/svr4/svr4_syscall.h b/sys/compat/svr4/svr4_syscall.h index 7ca712f21701..883a22652170 100644 --- a/sys/compat/svr4/svr4_syscall.h +++ b/sys/compat/svr4/svr4_syscall.h @@ -1,4 +1,4 @@ -/* $NetBSD: svr4_syscall.h,v 1.73 2005/12/11 12:20:26 christos Exp $ */ +/* $NetBSD: svr4_syscall.h,v 1.74 2006/04/02 06:34:18 macallan Exp $ */ /* * System call numbers. @@ -7,6 +7,9 @@ * created from NetBSD: syscalls.master,v 1.52 2003/01/18 08:44:27 thorpej Exp */ +#ifndef _SVR4_SYS_SYSCALL_H_ +#define _SVR4_SYS_SYSCALL_H_ + /* syscall: "syscall" ret: "int" args: */ #define SVR4_SYS_syscall 0 @@ -395,6 +398,9 @@ /* syscall: "setregid" ret: "int" args: "int" "int" */ #define SVR4_SYS_setregid 203 +/* syscall: "schedctl" ret: "int" args: "unsigned int" "int" "void **" */ +#define SVR4_SYS_schedctl 206 + /* syscall: "resolvepath" ret: "int" args: "const char *" "char *" "size_t" */ #define SVR4_SYS_resolvepath 209 @@ -500,3 +506,4 @@ #endif #define SVR4_SYS_MAXSYSCALL 256 #define SVR4_SYS_NSYSENT 256 +#endif /* _SVR4_SYS_SYSCALL_H_ */ diff --git a/sys/compat/svr4/svr4_syscallargs.h b/sys/compat/svr4/svr4_syscallargs.h index 93b1a0fdee08..c02f06ecb162 100644 --- a/sys/compat/svr4/svr4_syscallargs.h +++ b/sys/compat/svr4/svr4_syscallargs.h @@ -1,4 +1,4 @@ -/* $NetBSD: svr4_syscallargs.h,v 1.72 2005/12/11 12:20:26 christos Exp $ */ +/* $NetBSD: svr4_syscallargs.h,v 1.73 2006/04/02 06:34:18 macallan Exp $ */ /* * System call argument lists. @@ -7,8 +7,8 @@ * created from NetBSD: syscalls.master,v 1.52 2003/01/18 08:44:27 thorpej Exp */ -#ifndef _SVR4_SYS__SYSCALLARGS_H_ -#define _SVR4_SYS__SYSCALLARGS_H_ +#ifndef _SVR4_SYS_SYSCALLARGS_H_ +#define _SVR4_SYS_SYSCALLARGS_H_ #ifdef syscallarg #undef syscallarg @@ -420,6 +420,12 @@ struct svr4_sys_facl_args { syscallarg(struct svr4_aclent *) buf; }; +struct svr4_sys_schedctl_args { + syscallarg(unsigned int) x; + syscallarg(int) y; + syscallarg(void **) z; +}; + struct svr4_sys_resolvepath_args { syscallarg(const char *) path; syscallarg(char *) buf; @@ -767,6 +773,8 @@ int sys_setreuid(struct lwp *, void *, register_t *); int sys_setregid(struct lwp *, void *, register_t *); +int svr4_sys_schedctl(struct lwp *, void *, register_t *); + int svr4_sys_resolvepath(struct lwp *, void *, register_t *); int svr4_sys_getdents64(struct lwp *, void *, register_t *); @@ -836,4 +844,4 @@ int sys_ntp_adjtime(struct lwp *, void *, register_t *); #else #endif -#endif /* _SVR4_SYS__SYSCALLARGS_H_ */ +#endif /* _SVR4_SYS_SYSCALLARGS_H_ */ diff --git a/sys/compat/svr4/svr4_syscalls.c b/sys/compat/svr4/svr4_syscalls.c index da4e0ec59a72..675121ee5bb0 100644 --- a/sys/compat/svr4/svr4_syscalls.c +++ b/sys/compat/svr4/svr4_syscalls.c @@ -1,4 +1,4 @@ -/* $NetBSD: svr4_syscalls.c,v 1.73 2005/12/11 12:20:26 christos Exp $ */ +/* $NetBSD: svr4_syscalls.c,v 1.74 2006/04/02 06:34:18 macallan Exp $ */ /* * System call names. @@ -8,7 +8,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: svr4_syscalls.c,v 1.73 2005/12/11 12:20:26 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: svr4_syscalls.c,v 1.74 2006/04/02 06:34:18 macallan Exp $"); #if defined(_KERNEL_OPT) #if defined(_KERNEL_OPT) @@ -31,6 +31,7 @@ __KERNEL_RCSID(0, "$NetBSD: svr4_syscalls.c,v 1.73 2005/12/11 12:20:26 christos #include #include #include +#include #endif /* _KERNEL_OPT */ const char *const svr4_syscallnames[] = { @@ -252,7 +253,7 @@ const char *const svr4_syscallnames[] = { "setregid", /* 203 = setregid */ "#204 (unimplemented install_utrap)", /* 204 = unimplemented install_utrap */ "#205 (unimplemented signotify)", /* 205 = unimplemented signotify */ - "#206 (unimplemented schedctl)", /* 206 = unimplemented schedctl */ + "schedctl", /* 206 = schedctl */ "#207 (unimplemented pset)", /* 207 = unimplemented pset */ "#208 (unimplemented)", /* 208 = unimplemented */ "resolvepath", /* 209 = resolvepath */ diff --git a/sys/compat/svr4/svr4_sysent.c b/sys/compat/svr4/svr4_sysent.c index 54c8a97cdaeb..b37a1ff86976 100644 --- a/sys/compat/svr4/svr4_sysent.c +++ b/sys/compat/svr4/svr4_sysent.c @@ -1,4 +1,4 @@ -/* $NetBSD: svr4_sysent.c,v 1.75 2005/12/11 12:20:26 christos Exp $ */ +/* $NetBSD: svr4_sysent.c,v 1.76 2006/04/02 06:34:18 macallan Exp $ */ /* * System call switch table. @@ -8,7 +8,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: svr4_sysent.c,v 1.75 2005/12/11 12:20:26 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: svr4_sysent.c,v 1.76 2006/04/02 06:34:18 macallan Exp $"); #if defined(_KERNEL_OPT) #include "opt_ntp.h" @@ -30,6 +30,7 @@ __KERNEL_RCSID(0, "$NetBSD: svr4_sysent.c,v 1.75 2005/12/11 12:20:26 christos Ex #include #include #include +#include #define s(type) sizeof(type) @@ -461,8 +462,8 @@ struct sysent svr4_sysent[] = { sys_nosys }, /* 204 = unimplemented install_utrap */ { 0, 0, 0, sys_nosys }, /* 205 = unimplemented signotify */ - { 0, 0, 0, - sys_nosys }, /* 206 = unimplemented schedctl */ + { 3, s(struct svr4_sys_schedctl_args), 0, + svr4_sys_schedctl }, /* 206 = schedctl */ { 0, 0, 0, sys_nosys }, /* 207 = unimplemented pset */ { 0, 0, 0, diff --git a/sys/compat/svr4/syscalls.master b/sys/compat/svr4/syscalls.master index fca8d4ba0ac5..176fa9819bd4 100644 --- a/sys/compat/svr4/syscalls.master +++ b/sys/compat/svr4/syscalls.master @@ -1,4 +1,4 @@ - $NetBSD: syscalls.master,v 1.52 2003/01/18 08:44:27 thorpej Exp $ + $NetBSD: syscalls.master,v 1.53 2006/04/02 06:34:18 macallan Exp $ ; @(#)syscalls.master 8.1 (Berkeley) 7/19/93 @@ -53,7 +53,7 @@ #include #include #include - +#include %% 0 NOARGS { int sys_nosys(void); } syscall @@ -335,7 +335,7 @@ 203 NOARGS { int sys_setregid(int rgid, int egid); } 204 UNIMPL install_utrap 205 UNIMPL signotify -206 UNIMPL schedctl +206 STD { int svr4_sys_schedctl(unsigned int x, int y, void **z); } 207 UNIMPL pset 208 UNIMPL 209 STD { int svr4_sys_resolvepath(const char *path, \