diff options
| author | ad <ad@NetBSD.org> | 2007-02-09 21:55:00 +0000 |
|---|---|---|
| committer | ad <ad@NetBSD.org> | 2007-02-09 21:55:00 +0000 |
| commit | b07ec3fc388a5aeae51e8871aa89eefea3ce1e53 (patch) | |
| tree | c93d3b23a29f98ac0e26c9d43afb509219d0ea42 /sys/compat/linux32/arch | |
| parent | 5c1aad3ad0b9d2403784bd52128e8e8399e22254 (diff) | |
Merge newlock2 to head.
Diffstat (limited to 'sys/compat/linux32/arch')
| -rw-r--r-- | sys/compat/linux32/arch/amd64/linux32_machdep.c | 24 | ||||
| -rw-r--r-- | sys/compat/linux32/arch/amd64/linux32_missing.c | 3 | ||||
| -rw-r--r-- | sys/compat/linux32/arch/amd64/linux32_syscalls.c | 5 | ||||
| -rw-r--r-- | sys/compat/linux32/arch/amd64/linux32_sysent.c | 5 | ||||
| -rw-r--r-- | sys/compat/linux32/arch/amd64/syscalls.master | 3 |
5 files changed, 22 insertions, 18 deletions
diff --git a/sys/compat/linux32/arch/amd64/linux32_machdep.c b/sys/compat/linux32/arch/amd64/linux32_machdep.c index 85e5e2e052a..dd6606b1f59 100644 --- a/sys/compat/linux32/arch/amd64/linux32_machdep.c +++ b/sys/compat/linux32/arch/amd64/linux32_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: linux32_machdep.c,v 1.3 2006/11/22 13:56:09 christos Exp $ */ +/* $NetBSD: linux32_machdep.c,v 1.4 2007/02/09 21:55:21 ad Exp $ */ /*- * Copyright (c) 2006 Emmanuel Dreyfus, all rights reserved. @@ -31,7 +31,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: linux32_machdep.c,v 1.3 2006/11/22 13:56:09 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux32_machdep.c,v 1.4 2007/02/09 21:55:21 ad Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -51,7 +51,6 @@ __KERNEL_RCSID(0, "$NetBSD: linux32_machdep.c,v 1.3 2006/11/22 13:56:09 christos #include <sys/mount.h> #include <sys/vnode.h> #include <sys/device.h> -#include <sys/sa.h> #include <sys/syscallargs.h> #include <sys/filedesc.h> #include <sys/exec_elf.h> @@ -116,7 +115,7 @@ linux32_old_sendsig(const ksiginfo_t *ksi, const sigset_t *mask) struct proc *p = l->l_proc; struct trapframe *tf; struct linux32_sigframe *fp, frame; - int onstack; + int onstack, error; int sig = ksi->ksi_signo; sig_t catcher = SIGACTION(p, sig).sa_handler; struct sigaltstack *sas = &p->p_sigctx.ps_sigstk; @@ -141,7 +140,12 @@ linux32_old_sendsig(const ksiginfo_t *ksi, const sigset_t *mask) linux32_save_sigcontext(l, tf, mask, &frame.sf_sc); - if (copyout(&frame, fp, sizeof(frame)) != 0) { + sendsig_reset(l, sig); + mutex_exit(&p->p_smutex); + error = copyout(&frame, fp, sizeof(frame)); + mutex_enter(&p->p_smutex); + + if (error != 0) { /* * Process has trashed its stack; give it an illegal * instruction to halt it in its tracks. @@ -177,9 +181,9 @@ linux32_rt_sendsig(const ksiginfo_t *ksi, const sigset_t *mask) struct proc *p = l->l_proc; struct trapframe *tf; struct linux32_rt_sigframe *fp, frame; - int onstack; + int onstack, error; linux32_siginfo_t *lsi; - int sig = ksi->ksi_signo; + int sig = ksi->ksi_signo, error; sig_t catcher = SIGACTION(p, sig).sa_handler; struct sigaltstack *sas = &p->p_sigctx.ps_sigstk; @@ -242,9 +246,13 @@ linux32_rt_sendsig(const ksiginfo_t *ksi, const sigset_t *mask) } /* Save register context. */ + sendsig_reset(l, sig); + mutex_exit(&p->p_smutex); linux32_save_ucontext(l, tf, mask, sas, &frame.sf_uc); + error = copyout(&frame, fp, sizeof(frame)); + mutex_enter(&p->p-smutex); - if (copyout(&frame, fp, sizeof(frame)) != 0) { + if (error != 0) { /* * Process has trashed its stack; give it an illegal * instruction to halt it in its tracks. diff --git a/sys/compat/linux32/arch/amd64/linux32_missing.c b/sys/compat/linux32/arch/amd64/linux32_missing.c index bfa9667a74f..26f1029a1aa 100644 --- a/sys/compat/linux32/arch/amd64/linux32_missing.c +++ b/sys/compat/linux32/arch/amd64/linux32_missing.c @@ -1,4 +1,4 @@ -/* $NetBSD: linux32_missing.c,v 1.1 2006/02/09 19:18:57 manu Exp $ */ +/* $NetBSD: linux32_missing.c,v 1.2 2007/02/09 21:55:21 ad Exp $ */ #include "opt_compat_linux32.h" @@ -6,7 +6,6 @@ #include <sys/time.h> #include <sys/param.h> #include <sys/lwp.h> -#include <sys/sa.h> #include <sys/ucred.h> #include <sys/mount.h> #include <sys/systm.h> diff --git a/sys/compat/linux32/arch/amd64/linux32_syscalls.c b/sys/compat/linux32/arch/amd64/linux32_syscalls.c index 0bbc7d0673a..e136434fb0e 100644 --- a/sys/compat/linux32/arch/amd64/linux32_syscalls.c +++ b/sys/compat/linux32/arch/amd64/linux32_syscalls.c @@ -1,4 +1,4 @@ -/* $NetBSD: linux32_syscalls.c,v 1.12 2007/02/08 12:32:17 njoly Exp $ */ +/* $NetBSD: linux32_syscalls.c,v 1.13 2007/02/09 21:55:21 ad Exp $ */ /* * System call names. @@ -8,7 +8,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: linux32_syscalls.c,v 1.12 2007/02/08 12:32:17 njoly Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux32_syscalls.c,v 1.13 2007/02/09 21:55:21 ad Exp $"); #if defined(_KERNEL_OPT) #if defined(_KERNEL_OPT) @@ -19,7 +19,6 @@ __KERNEL_RCSID(0, "$NetBSD: linux32_syscalls.c,v 1.12 2007/02/08 12:32:17 njoly #include <sys/systm.h> #include <sys/signal.h> #include <sys/mount.h> -#include <sys/sa.h> #include <sys/syscallargs.h> #include <machine/netbsd32_machdep.h> #include <compat/netbsd32/netbsd32.h> diff --git a/sys/compat/linux32/arch/amd64/linux32_sysent.c b/sys/compat/linux32/arch/amd64/linux32_sysent.c index 817774c774e..1e7e72e9372 100644 --- a/sys/compat/linux32/arch/amd64/linux32_sysent.c +++ b/sys/compat/linux32/arch/amd64/linux32_sysent.c @@ -1,4 +1,4 @@ -/* $NetBSD: linux32_sysent.c,v 1.12 2007/02/08 12:32:17 njoly Exp $ */ +/* $NetBSD: linux32_sysent.c,v 1.13 2007/02/09 21:55:21 ad Exp $ */ /* * System call switch table. @@ -8,7 +8,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: linux32_sysent.c,v 1.12 2007/02/08 12:32:17 njoly Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux32_sysent.c,v 1.13 2007/02/09 21:55:21 ad Exp $"); #if defined(_KERNEL_OPT) #include "opt_compat_43.h" @@ -18,7 +18,6 @@ __KERNEL_RCSID(0, "$NetBSD: linux32_sysent.c,v 1.12 2007/02/08 12:32:17 njoly Ex #include <sys/systm.h> #include <sys/signal.h> #include <sys/mount.h> -#include <sys/sa.h> #include <sys/syscallargs.h> #include <machine/netbsd32_machdep.h> #include <compat/netbsd32/netbsd32.h> diff --git a/sys/compat/linux32/arch/amd64/syscalls.master b/sys/compat/linux32/arch/amd64/syscalls.master index 8f21932c16a..4d2d8e67d5c 100644 --- a/sys/compat/linux32/arch/amd64/syscalls.master +++ b/sys/compat/linux32/arch/amd64/syscalls.master @@ -1,4 +1,4 @@ - $NetBSD: syscalls.master,v 1.9 2007/02/08 12:29:39 njoly Exp $ + $NetBSD: syscalls.master,v 1.10 2007/02/09 21:55:21 ad Exp $ ; NetBSD i386 COMPAT_LINUX32 system call name/number "master" file. ; (See syscalls.conf to see what it is processed into.) @@ -40,7 +40,6 @@ #include <sys/systm.h> #include <sys/signal.h> #include <sys/mount.h> -#include <sys/sa.h> #include <sys/syscallargs.h> #include <machine/netbsd32_machdep.h> |
