Merge the nathanw_sa branch.

This commit is contained in:
thorpej 2003-01-18 21:21:28 +00:00
parent 8e448c92b9
commit 41978f782e
16 changed files with 226 additions and 187 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux_pipe.c,v 1.52 2001/11/13 02:08:57 lukem Exp $ */
/* $NetBSD: linux_pipe.c,v 1.53 2003/01/18 21:21:28 thorpej Exp $ */
/*-
* Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: linux_pipe.c,v 1.52 2001/11/13 02:08:57 lukem Exp $");
__KERNEL_RCSID(0, "$NetBSD: linux_pipe.c,v 1.53 2003/01/18 21:21:28 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -47,6 +47,7 @@ __KERNEL_RCSID(0, "$NetBSD: linux_pipe.c,v 1.52 2001/11/13 02:08:57 lukem Exp $"
#include <sys/mman.h>
#include <sys/mount.h>
#include <sys/sa.h>
#include <sys/syscallargs.h>
#include <compat/linux/common/linux_types.h>
@ -64,8 +65,8 @@ __KERNEL_RCSID(0, "$NetBSD: linux_pipe.c,v 1.52 2001/11/13 02:08:57 lukem Exp $"
* Linux directly passes the pointer.
*/
int
linux_sys_pipe(p, v, retval)
struct proc *p;
linux_sys_pipe(l, v, retval)
struct lwp *l;
void *v;
register_t *retval;
{
@ -74,7 +75,7 @@ linux_sys_pipe(p, v, retval)
} */ *uap = v;
int error;
if ((error = sys_pipe(p, 0, retval)))
if ((error = sys_pipe(l, 0, retval)))
return error;
/* Assumes register_t is an int */

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux_ptrace.h,v 1.6 2002/01/27 15:11:38 bjh21 Exp $ */
/* $NetBSD: linux_ptrace.h,v 1.7 2003/01/18 21:21:29 thorpej Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@ -59,11 +59,11 @@
#if defined(__i386__) || defined (__powerpc__) || defined (__mips__) || \
defined(__arm__)
int linux_sys_ptrace_arch __P((struct proc *, void *, register_t *));
int linux_sys_ptrace_arch __P((struct lwp *, void *, register_t *));
#define LINUX_SYS_PTRACE_ARCH(p,v,r) linux_sys_ptrace_arch((p),(v),(r))
#define LINUX_SYS_PTRACE_ARCH(l,v,r) linux_sys_ptrace_arch((l),(v),(r))
#else
#define LINUX_SYS_PTRACE_ARCH(p,v,r) EIO
#define LINUX_SYS_PTRACE_ARCH(l,v,r) EIO
#endif
#endif /* !_LINUX_PTRACE_H */

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux_sched.c,v 1.11 2002/12/22 00:00:22 gmcgarry Exp $ */
/* $NetBSD: linux_sched.c,v 1.12 2003/01/18 21:21:30 thorpej Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@ -42,12 +42,13 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: linux_sched.c,v 1.11 2002/12/22 00:00:22 gmcgarry Exp $");
__KERNEL_RCSID(0, "$NetBSD: linux_sched.c,v 1.12 2003/01/18 21:21:30 thorpej Exp $");
#include <sys/param.h>
#include <sys/mount.h>
#include <sys/proc.h>
#include <sys/systm.h>
#include <sys/sa.h>
#include <sys/syscallargs.h>
#include <machine/cpu.h>
@ -60,8 +61,8 @@ __KERNEL_RCSID(0, "$NetBSD: linux_sched.c,v 1.11 2002/12/22 00:00:22 gmcgarry Ex
#include <compat/linux/common/linux_sched.h>
int
linux_sys_clone(p, v, retval)
struct proc *p;
linux_sys_clone(l, v, retval)
struct lwp *l;
void *v;
register_t *retval;
{
@ -101,13 +102,13 @@ linux_sys_clone(p, v, retval)
* or down. So, we pass a stack size of 0, so that the code
* that makes this adjustment is a noop.
*/
return (fork1(p, flags, sig, SCARG(uap, stack), 0,
return (fork1(l, flags, sig, SCARG(uap, stack), 0,
NULL, NULL, retval, NULL));
}
int
linux_sys_sched_setparam(cp, v, retval)
struct proc *cp;
linux_sys_sched_setparam(cl, v, retval)
struct lwp *cl;
void *v;
register_t *retval;
{
@ -115,6 +116,7 @@ linux_sys_sched_setparam(cp, v, retval)
syscallarg(linux_pid_t) pid;
syscallarg(const struct linux_sched_param *) sp;
} */ *uap = v;
struct proc *cp = cl->l_proc;
int error;
struct linux_sched_param lp;
struct proc *p;
@ -148,8 +150,8 @@ linux_sys_sched_setparam(cp, v, retval)
}
int
linux_sys_sched_getparam(cp, v, retval)
struct proc *cp;
linux_sys_sched_getparam(cl, v, retval)
struct lwp *cl;
void *v;
register_t *retval;
{
@ -157,6 +159,7 @@ linux_sys_sched_getparam(cp, v, retval)
syscallarg(linux_pid_t) pid;
syscallarg(struct linux_sched_param *) sp;
} */ *uap = v;
struct proc *cp = cl->l_proc;
struct proc *p;
struct linux_sched_param lp;
@ -185,8 +188,8 @@ linux_sys_sched_getparam(cp, v, retval)
}
int
linux_sys_sched_setscheduler(cp, v, retval)
struct proc *cp;
linux_sys_sched_setscheduler(cl, v, retval)
struct lwp *cl;
void *v;
register_t *retval;
{
@ -195,6 +198,7 @@ linux_sys_sched_setscheduler(cp, v, retval)
syscallarg(int) policy;
syscallarg(cont struct linux_sched_scheduler *) sp;
} */ *uap = v;
struct proc *cp = cl->l_proc;
int error;
struct linux_sched_param lp;
struct proc *p;
@ -234,14 +238,15 @@ linux_sys_sched_setscheduler(cp, v, retval)
}
int
linux_sys_sched_getscheduler(cp, v, retval)
struct proc *cp;
linux_sys_sched_getscheduler(cl, v, retval)
struct lwp *cl;
void *v;
register_t *retval;
{
struct linux_sys_sched_getscheduler_args /* {
syscallarg(linux_pid_t) pid;
} */ *uap = v;
struct proc *cp = cl->l_proc;
struct proc *p;
*retval = -1;
@ -271,8 +276,8 @@ linux_sys_sched_getscheduler(cp, v, retval)
}
int
linux_sys_sched_yield(cp, v, retval)
struct proc *cp;
linux_sys_sched_yield(cl, v, retval)
struct lwp *cl;
void *v;
register_t *retval;
{
@ -282,8 +287,8 @@ linux_sys_sched_yield(cp, v, retval)
}
int
linux_sys_sched_get_priority_max(cp, v, retval)
struct proc *cp;
linux_sys_sched_get_priority_max(cl, v, retval)
struct lwp *cl;
void *v;
register_t *retval;
{
@ -304,8 +309,8 @@ linux_sys_sched_get_priority_max(cp, v, retval)
}
int
linux_sys_sched_get_priority_min(cp, v, retval)
struct proc *cp;
linux_sys_sched_get_priority_min(cl, v, retval)
struct lwp *cl;
void *v;
register_t *retval;
{

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux_sem.h,v 1.4 1998/10/04 00:02:41 fvdl Exp $ */
/* $NetBSD: linux_sem.h,v 1.5 2003/01/18 21:21:30 thorpej Exp $ */
/*-
* Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
@ -88,7 +88,7 @@ struct linux_sys_semctl_args {
#ifdef SYSVSEM
#ifdef _KERNEL
__BEGIN_DECLS
int linux_sys_semctl __P((struct proc *, void *, register_t *));
int linux_sys_semctl __P((struct lwp *, void *, register_t *));
void bsd_to_linux_semid_ds __P((struct semid_ds *,
struct linux_semid_ds *));
void linux_to_bsd_semid_ds __P((struct linux_semid_ds *,

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux_shm.h,v 1.4 1998/10/04 00:02:41 fvdl Exp $ */
/* $NetBSD: linux_shm.h,v 1.5 2003/01/18 21:21:31 thorpej Exp $ */
/*-
* Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
@ -85,8 +85,8 @@ struct linux_sys_shmctl_args {
#ifdef SYSVSHM
#ifdef _KERNEL
__BEGIN_DECLS
int linux_sys_shmat __P((struct proc *, void *, register_t *));
int linux_sys_shmctl __P((struct proc *, void *, register_t *));
int linux_sys_shmat __P((struct lwp *, void *, register_t *));
int linux_sys_shmctl __P((struct lwp *, void *, register_t *));
void linux_to_bsd_shmid_ds __P((struct linux_shmid_ds *,
struct shmid_ds *));
void bsd_to_linux_shmid_ds __P((struct shmid_ds *,

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux_sig_notalpha.c,v 1.26 2002/07/04 23:32:11 thorpej Exp $ */
/* $NetBSD: linux_sig_notalpha.c,v 1.27 2003/01/18 21:21:32 thorpej Exp $ */
/*-
* Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: linux_sig_notalpha.c,v 1.26 2002/07/04 23:32:11 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: linux_sig_notalpha.c,v 1.27 2003/01/18 21:21:32 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -52,6 +52,7 @@ __KERNEL_RCSID(0, "$NetBSD: linux_sig_notalpha.c,v 1.26 2002/07/04 23:32:11 thor
#include <sys/signal.h>
#include <sys/signalvar.h>
#include <sys/sa.h>
#include <sys/syscallargs.h>
#include <compat/linux/common/linux_types.h>
@ -70,8 +71,8 @@ __KERNEL_RCSID(0, "$NetBSD: linux_sig_notalpha.c,v 1.26 2002/07/04 23:32:11 thor
* sigaction() apply.
*/
int
linux_sys_signal(p, v, retval)
struct proc *p;
linux_sys_signal(l, v, retval)
struct lwp *l;
void *v;
register_t *retval;
{
@ -79,6 +80,7 @@ linux_sys_signal(p, v, retval)
syscallarg(int) signum;
syscallarg(linux_handler_t) handler;
} */ *uap = v;
struct proc *p = l->l_proc;
struct sigaction nbsa, obsa;
int error, sig;
@ -100,11 +102,12 @@ linux_sys_signal(p, v, retval)
/* ARGSUSED */
int
linux_sys_siggetmask(p, v, retval)
struct proc *p;
linux_sys_siggetmask(l, v, retval)
struct lwp *l;
void *v;
register_t *retval;
{
struct proc *p = l->l_proc;
sigset_t bss;
linux_old_sigset_t lss;
int error;
@ -123,14 +126,15 @@ linux_sys_siggetmask(p, v, retval)
* they are here, and have not been mapped directly.
*/
int
linux_sys_sigsetmask(p, v, retval)
struct proc *p;
linux_sys_sigsetmask(l, v, retval)
struct lwp *l;
void *v;
register_t *retval;
{
struct linux_sys_sigsetmask_args /* {
syscallarg(linux_old_sigset_t) mask;
} */ *uap = v;
struct proc *p = l->l_proc;
sigset_t nbss, obss;
linux_old_sigset_t nlss, olss;
int error;
@ -146,8 +150,8 @@ linux_sys_sigsetmask(p, v, retval)
}
int
linux_sys_sigprocmask(p, v, retval)
struct proc *p;
linux_sys_sigprocmask(l, v, retval)
struct lwp *l;
void *v;
register_t *retval;
{
@ -156,6 +160,7 @@ linux_sys_sigprocmask(p, v, retval)
syscallarg(const linux_old_sigset_t *) set;
syscallarg(linux_old_sigset_t *) oset;
} */ *uap = v;
struct proc *p = l->l_proc;
return(linux_sigprocmask1(p, SCARG(uap, how),
SCARG(uap, set), SCARG(uap, oset)));
@ -166,11 +171,12 @@ linux_sys_sigprocmask(p, v, retval)
* of sigsuspend(2).
*/
int
linux_sys_pause(p, v, retval)
struct proc *p;
linux_sys_pause(l, v, retval)
struct lwp *l;
void *v;
register_t *retval;
{
struct proc *p = l->l_proc;
return (sigsuspend1(p, 0));
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux_sigaction.c,v 1.24 2002/07/04 23:32:11 thorpej Exp $ */
/* $NetBSD: linux_sigaction.c,v 1.25 2003/01/18 21:21:32 thorpej Exp $ */
/*-
* Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: linux_sigaction.c,v 1.24 2002/07/04 23:32:11 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: linux_sigaction.c,v 1.25 2003/01/18 21:21:32 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -52,6 +52,7 @@ __KERNEL_RCSID(0, "$NetBSD: linux_sigaction.c,v 1.24 2002/07/04 23:32:11 thorpej
#include <sys/signal.h>
#include <sys/signalvar.h>
#include <sys/sa.h>
#include <sys/syscallargs.h>
#include <compat/linux/common/linux_types.h>
@ -68,8 +69,8 @@ __KERNEL_RCSID(0, "$NetBSD: linux_sigaction.c,v 1.24 2002/07/04 23:32:11 thorpej
* and just call sigaction().
*/
int
linux_sys_sigaction(p, v, retval)
struct proc *p;
linux_sys_sigaction(l, v, retval)
struct lwp *l;
void *v;
register_t *retval;
{
@ -78,6 +79,7 @@ linux_sys_sigaction(p, v, retval)
syscallarg(const struct linux_old_sigaction *) nsa;
syscallarg(struct linux_old_sigaction *) osa;
} */ *uap = v;
struct proc *p = l->l_proc;
struct linux_old_sigaction nlsa, olsa;
struct sigaction nbsa, obsa;
int error, sig;

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux_signal.c,v 1.39 2002/11/26 18:43:21 christos Exp $ */
/* $NetBSD: linux_signal.c,v 1.40 2003/01/18 21:21:33 thorpej Exp $ */
/*-
* Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
* All rights reserved.
@ -54,7 +54,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: linux_signal.c,v 1.39 2002/11/26 18:43:21 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: linux_signal.c,v 1.40 2003/01/18 21:21:33 thorpej Exp $");
#define COMPAT_LINUX 1
@ -70,6 +70,7 @@ __KERNEL_RCSID(0, "$NetBSD: linux_signal.c,v 1.39 2002/11/26 18:43:21 christos E
#include <sys/signalvar.h>
#include <sys/malloc.h>
#include <sys/sa.h>
#include <sys/syscallargs.h>
#include <compat/linux/common/linux_types.h>
@ -287,8 +288,8 @@ native_to_linux_sigaction(lsa, bsa)
* ignored (see above).
*/
int
linux_sys_rt_sigaction(p, v, retval)
struct proc *p;
linux_sys_rt_sigaction(l, v, retval)
struct lwp *l;
void *v;
register_t *retval;
{
@ -298,6 +299,7 @@ linux_sys_rt_sigaction(p, v, retval)
syscallarg(struct linux_sigaction *) osa;
syscallarg(size_t) sigsetsize;
} */ *uap = v;
struct proc *p = l->l_proc;
struct linux_sigaction nlsa, olsa;
struct sigaction nbsa, obsa;
int error, sig;
@ -381,8 +383,8 @@ linux_sigprocmask1(p, how, set, oset)
}
int
linux_sys_rt_sigprocmask(p, v, retval)
struct proc *p;
linux_sys_rt_sigprocmask(l, v, retval)
struct lwp *l;
void *v;
register_t *retval;
{
@ -392,7 +394,7 @@ linux_sys_rt_sigprocmask(p, v, retval)
syscallarg(linux_sigset_t *) oset;
syscallarg(size_t) sigsetsize;
} */ *uap = v;
struct proc *p = l->l_proc;
linux_sigset_t nlss, olss, *oset;
const linux_sigset_t *set;
sigset_t nbss, obss;
@ -434,8 +436,8 @@ linux_sys_rt_sigprocmask(p, v, retval)
}
int
linux_sys_rt_sigpending(p, v, retval)
struct proc *p;
linux_sys_rt_sigpending(l, v, retval)
struct lwp *l;
void *v;
register_t *retval;
{
@ -443,6 +445,7 @@ linux_sys_rt_sigpending(p, v, retval)
syscallarg(linux_sigset_t *) set;
syscallarg(size_t) sigsetsize;
} */ *uap = v;
struct proc *p = l->l_proc;
sigset_t bss;
linux_sigset_t lss;
@ -455,14 +458,15 @@ linux_sys_rt_sigpending(p, v, retval)
}
int
linux_sys_sigpending(p, v, retval)
struct proc *p;
linux_sys_sigpending(l, v, retval)
struct lwp *l;
void *v;
register_t *retval;
{
struct linux_sys_sigpending_args /* {
syscallarg(linux_old_sigset_t *) mask;
} */ *uap = v;
struct proc *p = l->l_proc;
sigset_t bss;
linux_old_sigset_t lss;
@ -472,8 +476,8 @@ linux_sys_sigpending(p, v, retval)
}
int
linux_sys_sigsuspend(p, v, retval)
struct proc *p;
linux_sys_sigsuspend(l, v, retval)
struct lwp *l;
void *v;
register_t *retval;
{
@ -482,6 +486,7 @@ linux_sys_sigsuspend(p, v, retval)
syscallarg(int) oldmask;
syscallarg(int) mask;
} */ *uap = v;
struct proc *p = l->l_proc;
linux_old_sigset_t lss;
sigset_t bss;
@ -490,8 +495,8 @@ linux_sys_sigsuspend(p, v, retval)
return (sigsuspend1(p, &bss));
}
int
linux_sys_rt_sigsuspend(p, v, retval)
struct proc *p;
linux_sys_rt_sigsuspend(l, v, retval)
struct lwp *l;
void *v;
register_t *retval;
{
@ -499,6 +504,7 @@ linux_sys_rt_sigsuspend(p, v, retval)
syscallarg(linux_sigset_t *) unewset;
syscallarg(size_t) sigsetsize;
} */ *uap = v;
struct proc *p = l->l_proc;
linux_sigset_t lss;
sigset_t bss;
int error;
@ -520,8 +526,8 @@ linux_sys_rt_sigsuspend(p, v, retval)
* Note: also used as sys_rt_queueinfo. The info field is ignored.
*/
int
linux_sys_rt_queueinfo(p, v, retval)
struct proc *p;
linux_sys_rt_queueinfo(l, v, retval)
struct lwp *l;
void *v;
register_t *retval;
{
@ -536,12 +542,12 @@ linux_sys_rt_queueinfo(p, v, retval)
/* XXX To really implement this we need to */
/* XXX keep a list of queued signals somewhere. */
return (linux_sys_kill(p, v, retval));
return (linux_sys_kill(l, v, retval));
}
int
linux_sys_kill(p, v, retval)
struct proc *p;
linux_sys_kill(l, v, retval)
struct lwp *l;
void *v;
register_t *retval;
{
@ -549,6 +555,7 @@ linux_sys_kill(p, v, retval)
syscallarg(int) pid;
syscallarg(int) signum;
} */ *uap = v;
struct sys_kill_args ka;
int sig;
@ -557,7 +564,7 @@ linux_sys_kill(p, v, retval)
if (sig < 0 || sig >= LINUX__NSIG)
return (EINVAL);
SCARG(&ka, signum) = linux_to_native_signo[sig];
return sys_kill(p, &ka, retval);
return sys_kill(l, &ka, retval);
}
#ifdef LINUX_SS_ONSTACK
@ -597,8 +604,8 @@ native_to_linux_sigaltstack(lss, bss)
}
int
linux_sys_sigaltstack(p, v, retval)
struct proc *p;
linux_sys_sigaltstack(l, v, retval)
struct lwp *l;
void *v;
register_t *retval;
{
@ -606,6 +613,7 @@ linux_sys_sigaltstack(p, v, retval)
syscallarg(const struct linux_sigaltstack *) ss;
syscallarg(struct linux_sigaltstack *) oss;
} */ *uap = v;
struct proc *p = l->l_proc;
struct linux_sigaltstack ss;
struct sigaltstack nss, oss;
int error;

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux_socket.c,v 1.42 2002/11/29 14:32:27 fvdl Exp $ */
/* $NetBSD: linux_socket.c,v 1.43 2003/01/18 21:21:34 thorpej Exp $ */
/*-
* Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
@ -47,7 +47,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: linux_socket.c,v 1.42 2002/11/29 14:32:27 fvdl Exp $");
__KERNEL_RCSID(0, "$NetBSD: linux_socket.c,v 1.43 2003/01/18 21:21:34 thorpej Exp $");
#if defined(_KERNEL_OPT)
#include "opt_inet.h"
@ -78,6 +78,7 @@ __KERNEL_RCSID(0, "$NetBSD: linux_socket.c,v 1.42 2002/11/29 14:32:27 fvdl Exp $
#include <sys/mbuf.h>
#include <sys/syslog.h>
#include <sys/sa.h>
#include <sys/syscallargs.h>
#ifdef INET6
@ -209,8 +210,8 @@ bsd_to_linux_domain(bdom)
}
int
linux_sys_socket(p, v, retval)
struct proc *p;
linux_sys_socket(l, v, retval)
struct lwp *l;
void *v;
register_t *retval;
{
@ -227,7 +228,7 @@ linux_sys_socket(p, v, retval)
SCARG(&bsa, domain) = linux_to_bsd_domain(SCARG(uap, domain));
if (SCARG(&bsa, domain) == -1)
return EINVAL;
error = sys_socket(p, &bsa, retval);
error = sys_socket(l, &bsa, retval);
#ifdef INET6
/*
@ -236,6 +237,7 @@ linux_sys_socket(p, v, retval)
* for Linux apps if the sysctl value is set to 1.
*/
if (!error && ip6_v6only && SCARG(&bsa, domain) == PF_INET6) {
struct proc *p = l->l_proc;
struct file *fp;
if (getsock(p->p_fd, *retval, &fp) == 0) {
@ -258,8 +260,8 @@ linux_sys_socket(p, v, retval)
}
int
linux_sys_socketpair(p, v, retval)
struct proc *p;
linux_sys_socketpair(l, v, retval)
struct lwp *l;
void *v;
register_t *retval;
{
@ -278,12 +280,12 @@ linux_sys_socketpair(p, v, retval)
SCARG(&bsa, protocol) = SCARG(uap, protocol);
SCARG(&bsa, rsv) = SCARG(uap, rsv);
return sys_socketpair(p, &bsa, retval);
return sys_socketpair(l, &bsa, retval);
}
int
linux_sys_sendto(p, v, retval)
struct proc *p;
linux_sys_sendto(l, v, retval)
struct lwp *l;
void *v;
register_t *retval;
{
@ -295,6 +297,7 @@ linux_sys_sendto(p, v, retval)
syscallarg(struct osockaddr *) to;
syscallarg(int) tolen;
} */ *uap = v;
struct proc *p = l->l_proc;
struct sys_sendto_args bsa;
int tolen;
@ -316,12 +319,12 @@ linux_sys_sendto(p, v, retval)
SCARG(&bsa, to) = NULL;
SCARG(&bsa, tolen) = tolen;
return (sys_sendto(p, &bsa, retval));
return (sys_sendto(l, &bsa, retval));
}
int
linux_sys_sendmsg(p, v, retval)
struct proc *p;
linux_sys_sendmsg(l, v, retval)
struct lwp *l;
void *v;
register_t *retval;
{
@ -330,6 +333,7 @@ linux_sys_sendmsg(p, v, retval)
syscallarg(struct msghdr *) msg;
syscallarg(u_int) flags;
} */ *uap = v;
struct proc *p = l->l_proc;
struct msghdr msg;
int error;
struct sys_sendmsg_args bsa;
@ -367,7 +371,7 @@ linux_sys_sendmsg(p, v, retval)
SCARG(&bsa, msg) = nmsg;
SCARG(&bsa, flags) = SCARG(uap, flags);
if ((error = sys_sendmsg(p, &bsa, retval)))
if ((error = sys_sendmsg(l, &bsa, retval)))
return (error);
return (0);
@ -375,8 +379,8 @@ linux_sys_sendmsg(p, v, retval)
int
linux_sys_recvfrom(p, v, retval)
struct proc *p;
linux_sys_recvfrom(l, v, retval)
struct lwp *l;
void *v;
register_t *retval;
{
@ -398,7 +402,7 @@ linux_sys_recvfrom(p, v, retval)
SCARG(&bra, from) = (struct sockaddr *) SCARG(uap, from);
SCARG(&bra, fromlenaddr) = SCARG(uap, fromlenaddr);
if ((error = sys_recvfrom(p, &bra, retval)))
if ((error = sys_recvfrom(l, &bra, retval)))
return (error);
if (SCARG(uap, from) && (error = linux_sa_put(SCARG(uap, from))))
@ -408,8 +412,8 @@ linux_sys_recvfrom(p, v, retval)
}
int
linux_sys_recvmsg(p, v, retval)
struct proc *p;
linux_sys_recvmsg(l, v, retval)
struct lwp *l;
void *v;
register_t *retval;
{
@ -421,7 +425,7 @@ linux_sys_recvmsg(p, v, retval)
struct msghdr msg;
int error;
if ((error = sys_recvmsg(p, v, retval)))
if ((error = sys_recvmsg(l, v, retval)))
return (error);
error = copyin((caddr_t)SCARG(uap, msg), (caddr_t)&msg,
@ -573,8 +577,8 @@ linux_to_bsd_udp_sockopt(lopt)
* need conversion, as they are the same on both systems.
*/
int
linux_sys_setsockopt(p, v, retval)
struct proc *p;
linux_sys_setsockopt(l, v, retval)
struct lwp *l;
void *v;
register_t *retval;
{
@ -614,15 +618,15 @@ linux_sys_setsockopt(p, v, retval)
return EINVAL;
SCARG(&bsa, name) = name;
return sys_setsockopt(p, &bsa, retval);
return sys_setsockopt(l, &bsa, retval);
}
/*
* getsockopt(2) is very much the same as setsockopt(2) (see above)
*/
int
linux_sys_getsockopt(p, v, retval)
struct proc *p;
linux_sys_getsockopt(l, v, retval)
struct lwp *l;
void *v;
register_t *retval;
{
@ -662,7 +666,7 @@ linux_sys_getsockopt(p, v, retval)
return EINVAL;
SCARG(&bga, name) = name;
return sys_getsockopt(p, &bga, retval);
return sys_getsockopt(l, &bga, retval);
}
#define IF_NAME_LEN 16
@ -898,15 +902,16 @@ out:
if (error ==0 && dosys) {
SCARG(&ia, fd) = SCARG(uap, fd);
SCARG(&ia, data) = SCARG(uap, data);
error = sys_ioctl(p, &ia, retval);
/* XXX NJWLWP */
error = sys_ioctl(curlwp, &ia, retval);
}
return error;
}
int
linux_sys_connect(p, v, retval)
struct proc *p;
linux_sys_connect(l, v, retval)
struct lwp *l;
void *v;
register_t *retval;
{
@ -915,6 +920,7 @@ linux_sys_connect(p, v, retval)
syscallarg(const struct sockaddr *) name;
syscallarg(int) namelen;
} */ *uap = v;
struct proc *p = l->l_proc;
int error;
struct sockaddr *sa;
struct sys_connect_args bca;
@ -930,7 +936,7 @@ linux_sys_connect(p, v, retval)
SCARG(&bca, name) = sa;
SCARG(&bca, namelen) = (unsigned int) namlen;
error = sys_connect(p, &bca, retval);
error = sys_connect(l, &bca, retval);
if (error == EISCONN) {
struct file *fp;
@ -961,8 +967,8 @@ linux_sys_connect(p, v, retval)
}
int
linux_sys_bind(p, v, retval)
struct proc *p;
linux_sys_bind(l, v, retval)
struct lwp *l;
void *v;
register_t *retval;
{
@ -971,6 +977,7 @@ linux_sys_bind(p, v, retval)
syscallarg(const struct osockaddr *) name;
syscallarg(int) namelen;
} */ *uap = v;
struct proc *p = l->l_proc;
int error, namlen;
struct sys_bind_args bsa;
@ -989,12 +996,12 @@ linux_sys_bind(p, v, retval)
SCARG(&bsa, name) = NULL;
SCARG(&bsa, namelen) = namlen;
return (sys_bind(p, &bsa, retval));
return (sys_bind(l, &bsa, retval));
}
int
linux_sys_getsockname(p, v, retval)
struct proc *p;
linux_sys_getsockname(l, v, retval)
struct lwp *l;
void *v;
register_t *retval;
{
@ -1005,7 +1012,7 @@ linux_sys_getsockname(p, v, retval)
} */ *uap = v;
int error;
if ((error = sys_getsockname(p, uap, retval)) != 0)
if ((error = sys_getsockname(l, uap, retval)) != 0)
return (error);
if ((error = linux_sa_put((struct osockaddr *)SCARG(uap, asa))))
@ -1015,8 +1022,8 @@ linux_sys_getsockname(p, v, retval)
}
int
linux_sys_getpeername(p, v, retval)
struct proc *p;
linux_sys_getpeername(l, v, retval)
struct lwp *l;
void *v;
register_t *retval;
{
@ -1027,7 +1034,7 @@ linux_sys_getpeername(p, v, retval)
} */ *uap = v;
int error;
if ((error = sys_getpeername(p, uap, retval)) != 0)
if ((error = sys_getpeername(l, uap, retval)) != 0)
return (error);
if ((error = linux_sa_put((struct osockaddr *)SCARG(uap, asa))))
@ -1188,8 +1195,8 @@ linux_sa_put(osa)
}
int
linux_sys_recv(p, v, retval)
struct proc *p;
linux_sys_recv(l, v, retval)
struct lwp *l;
void *v;
register_t *retval;
{
@ -1209,12 +1216,12 @@ linux_sys_recv(p, v, retval)
SCARG(&bra, from) = NULL;
SCARG(&bra, fromlenaddr) = NULL;
return (sys_recvfrom(p, &bra, retval));
return (sys_recvfrom(l, &bra, retval));
}
int
linux_sys_send(p, v, retval)
struct proc *p;
linux_sys_send(l, v, retval)
struct lwp *l;
void *v;
register_t *retval;
{
@ -1233,12 +1240,12 @@ linux_sys_send(p, v, retval)
SCARG(&bsa, to) = NULL;
SCARG(&bsa, tolen) = 0;
return (sys_sendto(p, &bsa, retval));
return (sys_sendto(l, &bsa, retval));
}
int
linux_sys_accept(p, v, retval)
struct proc *p;
linux_sys_accept(l, v, retval)
struct lwp *l;
void *v;
register_t *retval;
{
@ -1254,7 +1261,7 @@ linux_sys_accept(p, v, retval)
SCARG(&baa, name) = (struct sockaddr *) SCARG(uap, name);
SCARG(&baa, anamelen) = (unsigned int *) SCARG(uap, anamelen);
if ((error = sys_accept(p, &baa, retval)))
if ((error = sys_accept(l, &baa, retval)))
return (error);
if (SCARG(uap, name) && (error = linux_sa_put(SCARG(uap, name))))

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux_socketcall.c,v 1.24 2002/03/29 20:49:41 christos Exp $ */
/* $NetBSD: linux_socketcall.c,v 1.25 2003/01/18 21:21:36 thorpej Exp $ */
/*-
* Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: linux_socketcall.c,v 1.24 2002/03/29 20:49:41 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: linux_socketcall.c,v 1.25 2003/01/18 21:21:36 thorpej Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@ -59,6 +59,7 @@ __KERNEL_RCSID(0, "$NetBSD: linux_socketcall.c,v 1.24 2002/03/29 20:49:41 christ
#include <sys/vnode.h>
#include <sys/device.h>
#include <sys/sa.h>
#include <sys/syscallargs.h>
#include <compat/linux/common/linux_types.h>
@ -118,8 +119,8 @@ static const struct {
* make and take appropriate action.
*/
int
linux_sys_socketcall(p, v, retval)
struct proc *p;
linux_sys_socketcall(l, v, retval)
struct lwp *l;
void *v;
register_t *retval;
{
@ -142,55 +143,55 @@ linux_sys_socketcall(p, v, retval)
switch (SCARG(uap, what)) {
case LINUX_SYS_socket:
error = linux_sys_socket(p, (void *)&lda, retval);
error = linux_sys_socket(l, (void *)&lda, retval);
break;
case LINUX_SYS_bind:
error = linux_sys_bind(p, (void *)&lda, retval);
error = linux_sys_bind(l, (void *)&lda, retval);
break;
case LINUX_SYS_connect:
error = linux_sys_connect(p, (void *)&lda, retval);
error = linux_sys_connect(l, (void *)&lda, retval);
break;
case LINUX_SYS_listen:
error = sys_listen(p, (void *)&lda, retval);
error = sys_listen(l, (void *)&lda, retval);
break;
case LINUX_SYS_accept:
error = linux_sys_accept(p, (void *)&lda, retval);
error = linux_sys_accept(l, (void *)&lda, retval);
break;
case LINUX_SYS_getsockname:
error = linux_sys_getsockname(p, (void *)&lda, retval);
error = linux_sys_getsockname(l, (void *)&lda, retval);
break;
case LINUX_SYS_getpeername:
error = linux_sys_getpeername(p, (void *)&lda, retval);
error = linux_sys_getpeername(l, (void *)&lda, retval);
break;
case LINUX_SYS_socketpair:
error = linux_sys_socketpair(p, (void *)&lda, retval);
error = linux_sys_socketpair(l, (void *)&lda, retval);
break;
case LINUX_SYS_send:
error = linux_sys_send(p, (void *)&lda, retval);
error = linux_sys_send(l, (void *)&lda, retval);
break;
case LINUX_SYS_recv:
error = linux_sys_recv(p, (void *)&lda, retval);
error = linux_sys_recv(l, (void *)&lda, retval);
break;
case LINUX_SYS_sendto:
error = linux_sys_sendto(p, (void *)&lda, retval);
error = linux_sys_sendto(l, (void *)&lda, retval);
break;
case LINUX_SYS_recvfrom:
error = linux_sys_recvfrom(p, (void *)&lda, retval);
error = linux_sys_recvfrom(l, (void *)&lda, retval);
break;
case LINUX_SYS_shutdown:
error = sys_shutdown(p, (void *)&lda, retval);
error = sys_shutdown(l, (void *)&lda, retval);
break;
case LINUX_SYS_setsockopt:
error = linux_sys_setsockopt(p, (void *)&lda, retval);
error = linux_sys_setsockopt(l, (void *)&lda, retval);
break;
case LINUX_SYS_getsockopt:
error = linux_sys_getsockopt(p, (void *)&lda, retval);
error = linux_sys_getsockopt(l, (void *)&lda, retval);
break;
case LINUX_SYS_sendmsg:
error = linux_sys_sendmsg(p, (void *)&lda, retval);
error = linux_sys_sendmsg(l, (void *)&lda, retval);
break;
case LINUX_SYS_recvmsg:
error = linux_sys_recvmsg(p, (void *)&lda, retval);
error = linux_sys_recvmsg(l, (void *)&lda, retval);
break;
default:
error = ENOSYS;

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux_socketcall.h,v 1.6 2001/07/04 10:09:24 jdolecek Exp $ */
/* $NetBSD: linux_socketcall.h,v 1.7 2003/01/18 21:21:37 thorpej Exp $ */
/*-
* Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
@ -229,21 +229,21 @@ struct linux_sys_shutdown_args {
# ifdef _KERNEL
__BEGIN_DECLS
int linux_sys_socket __P((struct proc *, void *, register_t *));
int linux_sys_socketpair __P((struct proc *, void *, register_t *));
int linux_sys_sendto __P((struct proc *, void *, register_t *));
int linux_sys_recvfrom __P((struct proc *, void *, register_t *));
int linux_sys_setsockopt __P((struct proc *, void *, register_t *));
int linux_sys_getsockopt __P((struct proc *, void *, register_t *));
int linux_sys_connect __P((struct proc *, void *, register_t *));
int linux_sys_bind __P((struct proc *, void *, register_t *));
int linux_sys_getsockname __P((struct proc *, void *, register_t *));
int linux_sys_getpeername __P((struct proc *, void *, register_t *));
int linux_sys_sendmsg __P((struct proc *, void *, register_t *));
int linux_sys_recvmsg __P((struct proc *, void *, register_t *));
int linux_sys_recv __P((struct proc *, void *, register_t *));
int linux_sys_send __P((struct proc *, void *, register_t *));
int linux_sys_accept __P((struct proc *, void *, register_t *));
int linux_sys_socket __P((struct lwp *, void *, register_t *));
int linux_sys_socketpair __P((struct lwp *, void *, register_t *));
int linux_sys_sendto __P((struct lwp *, void *, register_t *));
int linux_sys_recvfrom __P((struct lwp *, void *, register_t *));
int linux_sys_setsockopt __P((struct lwp *, void *, register_t *));
int linux_sys_getsockopt __P((struct lwp *, void *, register_t *));
int linux_sys_connect __P((struct lwp *, void *, register_t *));
int linux_sys_bind __P((struct lwp *, void *, register_t *));
int linux_sys_getsockname __P((struct lwp *, void *, register_t *));
int linux_sys_getpeername __P((struct lwp *, void *, register_t *));
int linux_sys_sendmsg __P((struct lwp *, void *, register_t *));
int linux_sys_recvmsg __P((struct lwp *, void *, register_t *));
int linux_sys_recv __P((struct lwp *, void *, register_t *));
int linux_sys_send __P((struct lwp *, void *, register_t *));
int linux_sys_accept __P((struct lwp *, void *, register_t *));
__END_DECLS
# endif /* !_KERNEL */

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux_sysctl.c,v 1.6 2002/11/25 10:34:34 schmonz Exp $ */
/* $NetBSD: linux_sysctl.c,v 1.7 2003/01/18 21:21:37 thorpej Exp $ */
/*-
* Copyright (c) 1982, 1986, 1989, 1993
@ -43,7 +43,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: linux_sysctl.c,v 1.6 2002/11/25 10:34:34 schmonz Exp $");
__KERNEL_RCSID(0, "$NetBSD: linux_sysctl.c,v 1.7 2003/01/18 21:21:37 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -51,6 +51,7 @@ __KERNEL_RCSID(0, "$NetBSD: linux_sysctl.c,v 1.6 2002/11/25 10:34:34 schmonz Exp
#include <sys/proc.h>
#include <sys/mount.h>
#include <sys/sysctl.h>
#include <sys/sa.h>
#include <sys/syscallargs.h>
#include <compat/linux/common/linux_types.h>
@ -80,11 +81,12 @@ int linux_bus_sysctl(int *, u_int, void *, size_t *, void *, size_t,
struct proc *);
int
linux_sys___sysctl(struct proc *p, void *v, register_t *retval)
linux_sys___sysctl(struct lwp *l, void *v, register_t *retval)
{
struct linux_sys___sysctl_args /* {
syscallarg(struct linux___sysctl *) lsp;
} */ *uap = v;
struct proc *p = l->l_proc;
struct linux___sysctl ls;
int error;
size_t savelen = 0, oldlen = 0;

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux_termios.c,v 1.15 2001/12/19 15:20:16 augustss Exp $ */
/* $NetBSD: linux_termios.c,v 1.16 2003/01/18 21:21:38 thorpej Exp $ */
/*-
* Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: linux_termios.c,v 1.15 2001/12/19 15:20:16 augustss Exp $");
__KERNEL_RCSID(0, "$NetBSD: linux_termios.c,v 1.16 2003/01/18 21:21:38 thorpej Exp $");
#include <sys/param.h>
#include <sys/proc.h>
@ -48,6 +48,7 @@ __KERNEL_RCSID(0, "$NetBSD: linux_termios.c,v 1.15 2001/12/19 15:20:16 augustss
#include <sys/mount.h>
#include <sys/termios.h>
#include <sys/sa.h>
#include <sys/syscallargs.h>
#include <compat/linux/common/linux_types.h>
@ -716,5 +717,6 @@ linux_ioctl_termios(p, uap, retval)
SCARG(&ia, fd) = SCARG(uap, fd);
SCARG(&ia, data) = SCARG(uap, data);
return sys_ioctl(p, &ia, retval);
/* XXX NJWLWP */
return sys_ioctl(curlwp, &ia, retval);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux_time.c,v 1.7 2002/01/17 15:10:26 rjs Exp $ */
/* $NetBSD: linux_time.c,v 1.8 2003/01/18 21:21:39 thorpej Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: linux_time.c,v 1.7 2002/01/17 15:10:26 rjs Exp $");
__KERNEL_RCSID(0, "$NetBSD: linux_time.c,v 1.8 2003/01/18 21:21:39 thorpej Exp $");
#include <sys/param.h>
#include <sys/ucred.h>
@ -46,6 +46,7 @@ __KERNEL_RCSID(0, "$NetBSD: linux_time.c,v 1.7 2002/01/17 15:10:26 rjs Exp $");
#include <sys/stdint.h>
#include <sys/time.h>
#include <sys/systm.h>
#include <sys/sa.h>
#include <sys/syscallargs.h>
#include <compat/linux/common/linux_types.h>
@ -66,8 +67,8 @@ __KERNEL_RCSID(0, "$NetBSD: linux_time.c,v 1.7 2002/01/17 15:10:26 rjs Exp $");
*/
struct timezone linux_sys_tz;
int linux_sys_gettimeofday(p, v, retval)
struct proc *p;
int linux_sys_gettimeofday(l, v, retval)
struct lwp *l;
void *v;
register_t *retval;
{
@ -78,7 +79,7 @@ int linux_sys_gettimeofday(p, v, retval)
int error = 0;
if (SCARG(uap, tp)) {
error = sys_gettimeofday (p, v, retval);
error = sys_gettimeofday (l, v, retval);
if (error)
return (error);
}
@ -92,8 +93,8 @@ int linux_sys_gettimeofday(p, v, retval)
return (0);
}
int linux_sys_settimeofday(p, v, retval)
struct proc *p;
int linux_sys_settimeofday(l, v, retval)
struct lwp *l;
void *v;
register_t *retval;
{
@ -104,7 +105,7 @@ int linux_sys_settimeofday(p, v, retval)
int error = 0;
if (SCARG(uap, tp)) {
error = sys_settimeofday(p, v, retval);
error = sys_settimeofday(l, v, retval);
if (error)
return (error);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux_uselib.c,v 1.8 2003/01/06 20:30:36 wiz Exp $ */
/* $NetBSD: linux_uselib.c,v 1.9 2003/01/18 21:21:40 thorpej Exp $ */
/*-
* Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: linux_uselib.c,v 1.8 2003/01/06 20:30:36 wiz Exp $");
__KERNEL_RCSID(0, "$NetBSD: linux_uselib.c,v 1.9 2003/01/18 21:21:40 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -51,6 +51,7 @@ __KERNEL_RCSID(0, "$NetBSD: linux_uselib.c,v 1.8 2003/01/06 20:30:36 wiz Exp $")
#include <sys/exec_elf.h>
#include <sys/mman.h>
#include <sys/sa.h>
#include <sys/syscallargs.h>
#include <machine/cpu.h>
@ -88,14 +89,15 @@ __KERNEL_RCSID(0, "$NetBSD: linux_uselib.c,v 1.8 2003/01/06 20:30:36 wiz Exp $")
*/
int
linux_sys_uselib(p, v, retval)
struct proc *p;
linux_sys_uselib(l, v, retval)
struct lwp *l;
void *v;
register_t *retval;
{
struct linux_sys_uselib_args /* {
syscallarg(const char *) path;
} */ *uap = v;
struct proc *p = l->l_proc;
caddr_t sg;
long bsize, dsize, tsize, taddr, baddr, daddr;
struct nameidata ni;

View File

@ -1,4 +1,4 @@
/* $NetBSD: iop.c,v 1.33 2003/01/01 00:10:18 thorpej Exp $ */
/* $NetBSD: iop.c,v 1.34 2003/01/18 21:23:13 thorpej Exp $ */
/*-
* Copyright (c) 2000, 2001, 2002 The NetBSD Foundation, Inc.
@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: iop.c,v 1.33 2003/01/01 00:10:18 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: iop.c,v 1.34 2003/01/18 21:23:13 thorpej Exp $");
#include "opt_i2o.h"
#include "iop.h"
@ -630,20 +630,22 @@ static void
iop_reconf_thread(void *cookie)
{
struct iop_softc *sc;
struct lwp *l;
struct i2o_lct lct;
u_int32_t chgind;
int rv;
sc = cookie;
chgind = sc->sc_chgind + 1;
l = curlwp;
for (;;) {
DPRINTF(("%s: async reconfig: requested 0x%08x\n",
sc->sc_dv.dv_xname, chgind));
PHOLD(sc->sc_reconf_proc);
PHOLD(l);
rv = iop_lct_get0(sc, &lct, sizeof(lct), chgind);
PRELE(sc->sc_reconf_proc);
PRELE(l);
DPRINTF(("%s: async reconfig: notified (0x%08x, %d)\n",
sc->sc_dv.dv_xname, le32toh(lct.changeindicator), rv));
@ -1119,9 +1121,9 @@ iop_hrt_get(struct iop_softc *sc)
struct i2o_hrt hrthdr, *hrt;
int size, rv;
PHOLD(curproc);
PHOLD(curlwp);
rv = iop_hrt_get0(sc, &hrthdr, sizeof(hrthdr));
PRELE(curproc);
PRELE(curlwp);
if (rv != 0)
return (rv);
@ -1269,7 +1271,7 @@ iop_field_get_all(struct iop_softc *sc, int tid, int group, void *buf,
pgop->oat.group = htole16(group);
if (ii == NULL)
PHOLD(curproc);
PHOLD(curlwp);
memset(buf, 0, size);
iop_msg_map(sc, im, mb, pgop, sizeof(*pgop), 1, NULL);
@ -1277,7 +1279,7 @@ iop_field_get_all(struct iop_softc *sc, int tid, int group, void *buf,
rv = iop_msg_post(sc, im, mb, (ii == NULL ? 30000 : 0));
if (ii == NULL)
PRELE(curproc);
PRELE(curlwp);
/* Detect errors; let partial transfers to count as success. */
if (ii == NULL && rv == 0) {
@ -1378,7 +1380,7 @@ iop_table_clear(struct iop_softc *sc, int tid, int group)
pgop.oat.group = htole16(group);
pgop.oat.fields[0] = htole16(0);
PHOLD(curproc);
PHOLD(curlwp);
iop_msg_map(sc, im, mb, &pgop, sizeof(pgop), 1, NULL);
rv = iop_msg_post(sc, im, mb, 30000);
if (rv != 0)
@ -1386,7 +1388,7 @@ iop_table_clear(struct iop_softc *sc, int tid, int group)
sc->sc_dv.dv_xname, tid, group);
iop_msg_unmap(sc, im);
PRELE(curproc);
PRELE(curlwp);
iop_msg_free(sc, im);
return (rv);
}
@ -1517,14 +1519,14 @@ iop_systab_set(struct iop_softc *sc)
}
}
PHOLD(curproc);
PHOLD(curlwp);
iop_msg_map(sc, im, mb, iop_systab, iop_systab_size, 1, NULL);
iop_msg_map(sc, im, mb, mema, sizeof(mema), 1, NULL);
iop_msg_map(sc, im, mb, ioa, sizeof(ioa), 1, NULL);
rv = iop_msg_post(sc, im, mb, 5000);
iop_msg_unmap(sc, im);
iop_msg_free(sc, im);
PRELE(curproc);
PRELE(curlwp);
return (rv);
}