Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/compat/hpux Merge the nathanw_sa branch.



details:   https://anonhg.NetBSD.org/src/rev/80e42ca6356e
branches:  trunk
changeset: 541744:80e42ca6356e
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Sat Jan 18 07:36:56 2003 +0000

description:
Merge the nathanw_sa branch.

diffstat:

 sys/compat/hpux/hpux_compat.c    |  281 ++++++++++++++++++++++++--------------
 sys/compat/hpux/hpux_exec.c      |   19 +-
 sys/compat/hpux/hpux_exec.h      |    4 +-
 sys/compat/hpux/hpux_exec_aout.c |    5 +-
 sys/compat/hpux/hpux_file.c      |  157 ++++++++++++---------
 sys/compat/hpux/hpux_ipc.c       |   41 ++--
 sys/compat/hpux/hpux_net.c       |   32 ++-
 sys/compat/hpux/hpux_sig.c       |   63 ++++----
 sys/compat/hpux/hpux_termio.h    |    6 +-
 sys/compat/hpux/hpux_tty.c       |   30 ++-
 sys/compat/hpux/syscalls.master  |    3 +-
 11 files changed, 373 insertions(+), 268 deletions(-)

diffs (truncated from 2008 to 300 lines):

diff -r 97a757ee0e62 -r 80e42ca6356e sys/compat/hpux/hpux_compat.c
--- a/sys/compat/hpux/hpux_compat.c     Sat Jan 18 07:33:52 2003 +0000
+++ b/sys/compat/hpux/hpux_compat.c     Sat Jan 18 07:36:56 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: hpux_compat.c,v 1.60 2002/08/03 00:12:51 itojun Exp $  */
+/*     $NetBSD: hpux_compat.c,v 1.61 2003/01/18 07:36:56 thorpej Exp $ */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -47,7 +47,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: hpux_compat.c,v 1.60 2002/08/03 00:12:51 itojun Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hpux_compat.c,v 1.61 2003/01/18 07:36:56 thorpej Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_sysv.h"
@@ -86,6 +86,7 @@
 #include <machine/psl.h>
 #include <machine/vmparam.h>
 
+#include <sys/sa.h>
 #include <sys/syscallargs.h>
 
 #include <compat/hpux/hpux.h>
@@ -108,30 +109,30 @@
  * HP-UX fork and vfork need to map the EAGAIN return value appropriately.
  */
 int
-hpux_sys_fork(p, v, retval)
-       struct proc *p;
+hpux_sys_fork(l, v, retval)
+       struct lwp *l;
        void *v;
        register_t *retval;
 {
        /* struct hpux_sys_fork_args *uap = v; */
        int error;
 
-       error = sys_fork(p, v, retval);
+       error = sys_fork(l, v, retval);
        if (error == EAGAIN)
                error = OEAGAIN;
        return (error);
 }
 
 int
-hpux_sys_vfork(p, v, retval)
-       struct proc *p;
+hpux_sys_vfork(l, v, retval)
+       struct lwp *l;
        void *v;
        register_t *retval;
 {
        /* struct hpux_sys_vfork_args *uap = v; */
        int error;
 
-       error = sys_vfork(p, v, retval);
+       error = sys_vfork(l, v, retval);
        if (error == EAGAIN)
                error = OEAGAIN;
        return (error);
@@ -144,8 +145,8 @@
  * termination signal from BSD to HP-UX.
  */
 int
-hpux_sys_wait3(p, v, retval)
-       struct proc *p;
+hpux_sys_wait3(l, v, retval)
+       struct lwp *l;
        void *v;
        register_t *retval;
 {
@@ -155,20 +156,21 @@
        if (SCARG(uap, rusage))
                return (EINVAL);
 #if __mc68k__
-       p->p_md.md_regs[PS] = PSL_ALLCC;
-       p->p_md.md_regs[R0] = SCARG(uap, options);
-       p->p_md.md_regs[R1] = SCARG(uap, rusage);
+       l->l_md.md_regs[PS] = PSL_ALLCC;
+       l->l_md.md_regs[R0] = SCARG(uap, options);
+       l->l_md.md_regs[R1] = SCARG(uap, rusage);
 #endif
 
-       return (hpux_sys_wait(p, uap, retval));
+       return (hpux_sys_wait(l, uap, retval));
 }
 
 int
-hpux_sys_wait(p, v, retval)
-       struct proc *p;
+hpux_sys_wait(l, v, retval)
+       struct lwp *l;
        void *v;
        register_t *retval;
 {
+       struct proc *p = l->l_proc;
        struct hpux_sys_wait_args *uap = v;
        struct sys_wait4_args w4;
        int error;
@@ -188,7 +190,7 @@
 
        SCARG(&w4, pid) = WAIT_ANY;
 
-       error = sys_wait4(p, &w4, retval);
+       error = sys_wait4(l, &w4, retval);
        /*
         * HP-UX wait always returns EINTR when interrupted by a signal
         * (well, unless its emulating a BSD process, but we don't bother...)
@@ -217,8 +219,8 @@
 }
 
 int
-hpux_sys_waitpid(p, v, retval)
-       struct proc *p;
+hpux_sys_waitpid(l, v, retval)
+       struct lwp *l;
        void *v;
        register_t *retval;
 {
@@ -226,7 +228,7 @@
        int rv, sig, xstat, error;
 
        SCARG(uap, rusage) = 0;
-       error = sys_wait4(p, uap, retval);
+       error = sys_wait4(l, uap, retval);
        /*
         * HP-UX wait always returns EINTR when interrupted by a signal
         * (well, unless its emulating a BSD process, but we don't bother...)
@@ -267,15 +269,16 @@
  *     FIOSNBIO:   return -1 and errno == EWOULDBLOCK
  */
 int
-hpux_sys_read(p, v, retval)
-       struct proc *p;
+hpux_sys_read(l, v, retval)
+       struct lwp *l;
        void *v;
        register_t *retval;
 {
+       struct proc *p = l->l_proc;
        struct hpux_sys_read_args *uap = v;
        int error;
 
-       error = sys_read(p, (struct sys_read_args *) uap, retval);
+       error = sys_read(l, (struct sys_read_args *) uap, retval);
        if (error == EWOULDBLOCK) {
                char *fp = &p->p_fd->fd_ofileflags[SCARG(uap, fd)];
 
@@ -291,15 +294,16 @@
 }
 
 int
-hpux_sys_write(p, v, retval)
-       struct proc *p;
+hpux_sys_write(l, v, retval)
+       struct lwp *l;
        void *v;
        register_t *retval;
 {
+       struct proc *p = l->l_proc;
        struct hpux_sys_write_args *uap = v;
        int error;
 
-       error = sys_write(p, (struct sys_write_args *) uap, retval);
+       error = sys_write(l, (struct sys_write_args *) uap, retval);
        if (error == EWOULDBLOCK) {
                char *fp = &p->p_fd->fd_ofileflags[SCARG(uap, fd)];
 
@@ -315,15 +319,16 @@
 }
 
 int
-hpux_sys_readv(p, v, retval)
-       struct proc *p;
+hpux_sys_readv(l, v, retval)
+       struct lwp *l;
        void *v;
        register_t *retval;
 {
+       struct proc *p = l->l_proc;
        struct hpux_sys_readv_args *uap = v;
        int error;
 
-       error = sys_readv(p, (struct sys_readv_args *) uap, retval);
+       error = sys_readv(l, (struct sys_readv_args *) uap, retval);
        if (error == EWOULDBLOCK) {
                char *fp = &p->p_fd->fd_ofileflags[SCARG(uap, fd)];
 
@@ -339,15 +344,16 @@
 }
 
 int
-hpux_sys_writev(p, v, retval)
-       struct proc *p;
+hpux_sys_writev(l, v, retval)
+       struct lwp *l;
        void *v;
        register_t *retval;
 {
+       struct proc *p = l->l_proc;
        struct hpux_sys_writev_args *uap = v;
        int error;
 
-       error = sys_writev(p, (struct sys_writev_args *) uap, retval);
+       error = sys_writev(l, (struct sys_writev_args *) uap, retval);
        if (error == EWOULDBLOCK) {
                char *fp = &p->p_fd->fd_ofileflags[SCARG(uap, fd)];
 
@@ -363,8 +369,8 @@
 }
 
 int
-hpux_sys_utssys(p, v, retval)
-       struct proc *p;
+hpux_sys_utssys(l, v, retval)
+       struct lwp *l;
        void *v;
        register_t *retval;
 {
@@ -423,8 +429,8 @@
 }
 
 int
-hpux_sys_sysconf(p, v, retval)
-       struct proc *p;
+hpux_sys_sysconf(l, v, retval)
+       struct lwp *l;
        void *v;
        register_t *retval;
 {
@@ -473,11 +479,12 @@
 }
 
 int
-hpux_sys_ulimit(p, v, retval)
-       struct proc *p;
+hpux_sys_ulimit(l, v, retval)
+       struct lwp *l;
        void *v;
        register_t *retval;
 {
+       struct proc *p = l->l_proc;
        struct hpux_sys_ulimit_args *uap = v;
        struct rlimit *limp;
        int error = 0;
@@ -513,8 +520,8 @@
  * values -16 (high) thru -1 (low).
  */
 int
-hpux_sys_rtprio(cp, v, retval)
-       struct proc *cp;
+hpux_sys_rtprio(lp, v, retval)
+       struct lwp *lp;
        void *v;
        register_t *retval;
 {
@@ -527,7 +534,7 @@
            SCARG(uap, prio) != RTPRIO_RTOFF)
                return (EINVAL);
        if (SCARG(uap, pid) == 0)
-               p = cp;
+               p = lp->l_proc;
        else if ((p = pfind(SCARG(uap, pid))) == 0)
                return (ESRCH);
        nice = p->p_nice - NZERO;
@@ -550,7 +557,7 @@
                nice = (SCARG(uap, prio) >> 3) - 16;
                break;
        }
-       error = donice(cp, p, nice);
+       error = donice(lp->l_proc, p, nice);
        if (error == EACCES)
                error = EPERM;
        return (error);
@@ -560,8 +567,8 @@
 
 #if 0 /* XXX - This really, really doesn't work anymore. --scottr */
 int
-hpux_sys_ptrace(p, v, retval)
-       struct proc *p;
+hpux_sys_ptrace(l, v, retval)
+       struct lwp *l;
        void *v;
        register_t *retval;
 {
@@ -569,7 +576,7 @@
        int error;
 #if defined(PT_READ_U) || defined(PT_WRITE_U)
        int isps = 0;
-       struct proc *cp;
+       struct lwp *lp;
 #endif
 
        switch (SCARG(uap, req)) {
@@ -623,7 +630,7 @@
 #endif
        }



Home | Main Index | Thread Index | Old Index