diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/compat/hpux/hppa/Makefile | 7 | ||||
-rw-r--r-- | sys/compat/hpux/hppa/files.hpux | 16 | ||||
-rw-r--r-- | sys/compat/hpux/hppa/hpux_exec.c | 243 | ||||
-rw-r--r-- | sys/compat/hpux/hppa/hpux_exec.h | 98 | ||||
-rw-r--r-- | sys/compat/hpux/hppa/hpux_sig.c | 414 | ||||
-rw-r--r-- | sys/compat/hpux/hppa/syscalls.conf | 12 | ||||
-rw-r--r-- | sys/compat/hpux/hppa/syscalls.master | 661 |
7 files changed, 1451 insertions, 0 deletions
diff --git a/sys/compat/hpux/hppa/Makefile b/sys/compat/hpux/hppa/Makefile new file mode 100644 index 00000000000..000caed040b --- /dev/null +++ b/sys/compat/hpux/hppa/Makefile @@ -0,0 +1,7 @@ +# $OpenBSD: Makefile,v 1.1 2004/07/09 21:48:21 mickey Exp $ + +DEP= syscalls.conf syscalls.master ../../../kern/makesyscalls.sh +OBJS= hpux_sysent.c hpux_syscalls.c hpux_syscall.h hpux_syscallargs.h + +${OBJS}: ${DEP} + sh ../../../kern/makesyscalls.sh syscalls.conf syscalls.master diff --git a/sys/compat/hpux/hppa/files.hpux b/sys/compat/hpux/hppa/files.hpux new file mode 100644 index 00000000000..6c41173d87d --- /dev/null +++ b/sys/compat/hpux/hppa/files.hpux @@ -0,0 +1,16 @@ +# $OpenBSD: files.hpux,v 1.1 2004/07/09 21:48:21 mickey Exp $ +# +# Config file description for machine-independent HPUX compat code. +# Included by ports that need it. + +# ports should define any machine-specific files they need in their +# own file lists. + +file compat/hpux/hpux_compat.c compat_hpux +file compat/hpux/hpux_file.c compat_hpux +file compat/hpux/hpux_tty.c compat_hpux +file compat/hpux/hppa/hpux_exec.c compat_hpux +#file compat/hpux/hppa/hpux_net.c compat_hpux +file compat/hpux/hppa/hpux_sig.c compat_hpux +file compat/hpux/hppa/hpux_syscalls.c compat_hpux & syscall_debug +file compat/hpux/hppa/hpux_sysent.c compat_hpux diff --git a/sys/compat/hpux/hppa/hpux_exec.c b/sys/compat/hpux/hppa/hpux_exec.c new file mode 100644 index 00000000000..f2ec546075c --- /dev/null +++ b/sys/compat/hpux/hppa/hpux_exec.c @@ -0,0 +1,243 @@ +/* $OpenBSD: hpux_exec.c,v 1.1 2004/07/09 21:48:21 mickey Exp $ */ + +/* + * Copyright (c) 2004 Michael Shalayeff. All rights reserved. + * Copyright (c) 1995, 1997 Jason R. Thorpe. All rights reserved. + * Copyright (c) 1993, 1994 Christopher G. Demetriou + * + * 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 + * This product includes software developed by Christopher G. Demetriou. + * 4. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + */ + +/* + * Glue for exec'ing HP-UX executables and the HP-UX execv() system call. + * Based on sys/kern/exec_aout.c + */ + +#include <sys/param.h> +#include <sys/systm.h> +#include <sys/kernel.h> +#include <sys/proc.h> +#include <sys/malloc.h> +#include <sys/mount.h> +#include <sys/namei.h> +#include <sys/user.h> +#include <sys/vnode.h> +#include <sys/mman.h> +#include <sys/stat.h> + +#include <uvm/uvm_extern.h> + +#include <machine/cpu.h> +#include <machine/reg.h> + +#include <sys/syscallargs.h> + +#include <compat/hpux/hpux.h> +#include <compat/hpux/hpux_util.h> +#include <compat/hpux/hppa/hpux_syscall.h> +#include <compat/hpux/hppa/hpux_syscallargs.h> + +#include <machine/hpux_machdep.h> + +const char hpux_emul_path[] = "/emul/hpux"; +extern char sigcode[], esigcode[]; +extern struct sysent hpux_sysent[]; +#ifdef SYSCALL_DEBUG +extern char *hpux_syscallnames[]; +#endif +extern int bsdtohpuxerrnomap[]; + +int exec_hpux_som_nmagic(struct proc *, struct exec_package *); +int exec_hpux_som_zmagic(struct proc *, struct exec_package *); +int exec_hpux_som_omagic(struct proc *, struct exec_package *); + +struct emul emul_hpux = { + "hpux", + bsdtohpuxerrnomap, + hpux_sendsig, + HPUX_SYS_syscall, + HPUX_SYS_MAXSYSCALL, + hpux_sysent, +#ifdef SYSCALL_DEBUG + hpux_syscallnames, +#else + NULL, +#endif + 0, + copyargs, + hpux_setregs, + NULL, + sigcode, + esigcode, +}; + +int +exec_hpux_makecmds(p, epp) + struct proc *p; + struct exec_package *epp; +{ + struct som_exec *som_ep = epp->ep_hdr; + short sysid, magic; + int error = ENOEXEC; + + sysid = HPUX_SYSID(som_ep); + if (sysid != MID_HPUX800 && sysid != MID_HPPA11 && sysid != MID_HPPA20) + return (error); + + /* XXX read in the aux header if it was not following the som header */ + if (sysid != MID_HPUX && (!(som_ep->som_version == HPUX_SOM_V0 || + som_ep->som_version == HPUX_SOM_V1) || + som_ep->som_auxhdr + sizeof(struct som_aux) < epp->ep_hdrvalid)) { + return (error); + } + + /* + * HP-UX is a 4k page size system, and executables assume + * this. + */ + if (PAGE_SIZE != HPUX_LDPGSZ) + return (error); + + magic = HPUX_MAGIC(som_ep); + switch (magic) { + case OMAGIC: + error = exec_hpux_som_omagic(p, epp); + break; + + case NMAGIC: + error = exec_hpux_som_nmagic(p, epp); + break; + + case ZMAGIC: + error = exec_hpux_som_zmagic(p, epp); + break; + } + + if (error == 0) { + /* set up our emulation information */ + epp->ep_emul = &emul_hpux; + } else + kill_vmcmds(&epp->ep_vmcmds); + + return (error); +} + +int +exec_hpux_som_nmagic(struct proc *p, struct exec_package *epp) +{ + struct som_exec *execp = epp->ep_hdr; + struct som_aux *auxp = epp->ep_hdr + execp->som_auxhdr; + + epp->ep_taddr = auxp->som_tmem; + epp->ep_tsize = auxp->som_tsize; + epp->ep_daddr = auxp->som_dmem; + epp->ep_dsize = auxp->som_dsize + auxp->som_bsize; + epp->ep_entry = auxp->som_entry; + + /* set up command for text segment */ + NEW_VMCMD(&epp->ep_vmcmds, vmcmd_map_readvn, epp->ep_tsize, + epp->ep_taddr, epp->ep_vp, auxp->som_tfile, + VM_PROT_READ|VM_PROT_EXECUTE); + + /* set up command for data segment */ + NEW_VMCMD(&epp->ep_vmcmds, vmcmd_map_readvn, auxp->som_dsize, + epp->ep_daddr, epp->ep_vp, auxp->som_dfile, + VM_PROT_READ|VM_PROT_WRITE|VM_PROT_EXECUTE); + + /* set up command for bss segment */ + if (auxp->som_bsize > 0) + NEW_VMCMD(&epp->ep_vmcmds, vmcmd_map_zero, auxp->som_bsize, + epp->ep_daddr + auxp->som_dsize, + NULLVP, 0, VM_PROT_READ|VM_PROT_WRITE|VM_PROT_EXECUTE); + + return (exec_setup_stack(p, epp)); +} + +int +exec_hpux_som_zmagic(struct proc *p, struct exec_package *epp) +{ + + return (exec_setup_stack(p, epp)); +} + +int +exec_hpux_som_omagic(struct proc *p, struct exec_package *epp) +{ + + return (exec_setup_stack(p, epp)); +} + +/* + * The HP-UX execv(2) system call. + * + * Just check the alternate emulation path, and pass it on to the NetBSD + * execve(). + */ +int +hpux_sys_execv(p, v, retval) + struct proc *p; + void *v; + register_t *retval; +{ + struct hpux_sys_execv_args /* { + syscallarg(char *) path; + syscallarg(char **) argv; + } */ *uap = v; + struct sys_execve_args ap; + caddr_t sg; + + sg = stackgap_init(p->p_emul); + HPUX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path)); + + SCARG(&ap, path) = SCARG(uap, path); + SCARG(&ap, argp) = SCARG(uap, argp); + SCARG(&ap, envp) = NULL; + + return sys_execve(p, &ap, retval); +} + +int +hpux_sys_execve(p, v, retval) + struct proc *p; + void *v; + register_t *retval; +{ + struct hpux_sys_execve_args /* { + syscallarg(char *) path; + syscallarg(char **) argv; + syscallarg(char **) envp; + } */ *uap = v; + struct sys_execve_args ap; + caddr_t sg; + + sg = stackgap_init(p->p_emul); + HPUX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path)); + + SCARG(&ap, path) = SCARG(uap, path); + SCARG(&ap, argp) = SCARG(uap, argp); + SCARG(&ap, envp) = SCARG(uap, envp); + + return (sys_execve(p, &ap, retval)); +} diff --git a/sys/compat/hpux/hppa/hpux_exec.h b/sys/compat/hpux/hppa/hpux_exec.h new file mode 100644 index 00000000000..169fe519308 --- /dev/null +++ b/sys/compat/hpux/hppa/hpux_exec.h @@ -0,0 +1,98 @@ +/* $OpenBSD: hpux_exec.h,v 1.1 2004/07/09 21:48:21 mickey Exp $ */ + +/* + * Copyright (c) 2004 Michael Shalayeff. All rights reserved. + * Copyright (c) 1995 Jason R. Thorpe. All rights reserved. + * Copyright (c) 1988 University of Utah. + * Copyright (c) 1990, 1993 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * the Systems Programming Group of the University of Utah Computer + * Science Department. + * + * 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. Neither the name of the University 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 REGENTS 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 REGENTS 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. + * + * from: Utah $Hdr: hpux_exec.h 1.6 92/01/20$ + * + * @(#)hpux_exec.h 8.1 (Berkeley) 6/10/93 + */ + +#ifndef _HPUX_EXEC_H_ +#define _HPUX_EXEC_H_ + +/* + * HPUX SOM header format + */ +struct som_exec { + long ha_magic; + long som_version; + struct timespec som_time; + long som_ep_space; + long som_ep_subspace; + long som_ep_offset; + long som_auxhdr; + long som_auxsize; + long pad[22]; /* there is more but we do not care */ + long som_cksum; +}; + +struct som_aux { + long som_flags; + long som_length; /* of the rest */ + long som_tsize; /* .text size */ + long som_tmem; /* .text address */ + long som_tfile; /* .text offset in file */ + long som_dsize; + long som_dmem; + long som_dfile; + long som_bsize; + long som_entry; + long som_ldflags; + long som_bfill; +}; + +#define HPUX_EXEC_HDR_SIZE \ + (sizeof(struct som_exec) + sizeof(struct som_aux)) + +#define HPUX_MAGIC(ha) ((ha)->ha_magic & 0xffff) +#define HPUX_SYSID(ha) (((ha)->ha_magic >> 16) & 0xffff) + +/* + * Additional values for HPUX_MAGIC() + */ +#define HPUX_MAGIC_RELOC 0x0106 /* relocatable object */ +#define HPUX_MAGIC_DL 0x010d /* dynamic load library */ +#define HPUX_MAGIC_SHL 0x010e /* shared library */ + +#define HPUX_SOM_V0 85082112 +#define HPUX_SOM_V1 87102412 + +#define HPUX_LDPGSZ 4096 /* align to this */ +#define HPUX_LDPGSHIFT 12 /* log2(HPUX_LDPGSZ) */ + +int exec_hpux_makecmds(struct proc *, struct exec_package *); + +#endif /* _HPUX_EXEC_H_ */ diff --git a/sys/compat/hpux/hppa/hpux_sig.c b/sys/compat/hpux/hppa/hpux_sig.c new file mode 100644 index 00000000000..012bbd1c160 --- /dev/null +++ b/sys/compat/hpux/hppa/hpux_sig.c @@ -0,0 +1,414 @@ +/* $OpenBSD: hpux_sig.c,v 1.1 2004/07/09 21:48:21 mickey Exp $ */ + +/* + * Copyright (c) 2004 Michael Shalayeff. All rights reserved. + * Copyright (c) 1988 University of Utah. + * Copyright (c) 1990, 1993 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * the Systems Programming Group of the University of Utah Computer + * Science Department. + * + * 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. Neither the name of the University 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 REGENTS 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 REGENTS 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. + * + * from: Utah $Hdr: hpux_sig.c 1.4 92/01/20$ + * + * @(#)hpux_sig.c 8.2 (Berkeley) 9/23/93 + */ + +/* + * Signal related HPUX compatibility routines + */ + +#include <sys/param.h> +#include <sys/systm.h> +#include <sys/kernel.h> +#include <sys/mount.h> +#include <sys/proc.h> +#include <sys/signalvar.h> +#include <sys/syscallargs.h> + +#include <compat/hpux/hpux.h> +#include <compat/hpux/hpux_sig.h> +#include <compat/hpux/hppa/hpux_syscallargs.h> + +/* indexed by HPUX signal number - 1 */ +char hpuxtobsdsigmap[NSIG] = { +/*01*/ SIGHUP, SIGINT, SIGQUIT, SIGILL, SIGTRAP, SIGIOT, SIGEMT, SIGFPE, +/*09*/ SIGKILL, SIGBUS, SIGSEGV, SIGSYS, SIGPIPE, SIGALRM, SIGTERM, SIGUSR1, +/*17*/ SIGUSR2, SIGCHLD, 0, SIGVTALRM,SIGPROF, SIGIO, SIGWINCH, SIGSTOP, +/*25*/ SIGTSTP, SIGCONT,SIGTTIN, SIGTTOU, SIGURG, 0, 0, 0 +}; + +/* indexed by BSD signal number - 1 */ +char bsdtohpuxsigmap[NSIG] = { +/*01*/ 1, 2, 3, 4, 5, 6, 7, 8, +/*09*/ 9, 10, 11, 12, 13, 14, 15, 29, +/*17*/ 24, 25, 26, 18, 27, 28, 22, 0, +/*25*/ 0, 20, 21, 23, 0, 16, 17, 0 +}; + +/* + * XXX: In addition to mapping the signal number we also have + * to see if the "old" style signal mechinism is needed. + * If so, we set the OUSIG flag. This is not really correct + * as under HP-UX "old" style handling can be set on a per + * signal basis and we are setting it for all signals in one + * swell foop. I suspect we can get away with this since I + * doubt any program of interest mixes the two semantics. + */ +int +hpux_sys_sigvec(p, v, retval) + struct proc *p; + void *v; + register_t *retval; +{ + struct hpux_sys_sigvec_args *uap = v; + struct sigvec vec; + struct sigacts *ps = p->p_sigacts; + struct sigvec *sv; + int sig; + int bit, error; + + sig = hpuxtobsdsig(SCARG(uap, signo)); + if (sig <= 0 || sig >= NSIG || sig == SIGKILL || sig == SIGSTOP) + return (EINVAL); + sv = &vec; + if (SCARG(uap, osv)) { + sv->sv_handler = ps->ps_sigact[sig]; + sv->sv_mask = ps->ps_catchmask[sig]; + bit = sigmask(sig); + sv->sv_flags = 0; + if ((ps->ps_sigonstack & bit) != 0) + sv->sv_flags |= SV_ONSTACK; + if ((ps->ps_sigintr & bit) != 0) + sv->sv_flags |= SV_INTERRUPT; + if ((ps->ps_sigreset & bit) != 0) + sv->sv_flags |= HPUXSV_RESET; + sv->sv_mask &= ~bit; + error = copyout((caddr_t)sv, (caddr_t)SCARG(uap, osv), + sizeof (vec)); + if (error) + return (error); + } + if (SCARG(uap, nsv)) { + error = copyin((caddr_t)SCARG(uap, nsv), (caddr_t)sv, + sizeof (vec)); + if (error) + return (error); + if (sig == SIGCONT && sv->sv_handler == SIG_IGN) + return (EINVAL); + sv->sv_flags ^= SA_RESTART; + setsigvec(p, sig, (struct sigaction *)sv); +#if 0 +/* XXX -- SOUSIG no longer exists, do something here */ + if (sv->sv_flags & HPUXSV_RESET) + p->p_flag |= SOUSIG; /* XXX */ +#endif + } + return (0); +} + +int +hpux_sys_sigblock(p, v, retval) + struct proc *p; + void *v; + register_t *retval; +{ + struct hpux_sys_sigblock_args *uap = v; + + (void) splhigh(); + *retval = bsdtohpuxmask(p->p_sigmask); + p->p_sigmask |= hpuxtobsdmask(SCARG(uap, mask)) &~ sigcantmask; + (void) spl0(); + return (0); +} + +int +hpux_sys_sigsetmask(p, v, retval) + struct proc *p; + void *v; + register_t *retval; +{ + struct hpux_sys_sigsetmask_args *uap = v; + + (void) splhigh(); + *retval = bsdtohpuxmask(p->p_sigmask); + p->p_sigmask = hpuxtobsdmask(SCARG(uap, mask)) &~ sigcantmask; + (void) spl0(); + return (0); +} + +int +hpux_sys_sigpause(p, v, retval) + struct proc *p; + void *v; + register_t *retval; +{ + struct hpux_sys_sigpause_args *uap = v; + + SCARG(uap, mask) = hpuxtobsdmask(SCARG(uap, mask)); + return (sys_sigsuspend(p, uap, retval)); +} + +/* not totally correct, but close enuf' */ +int +hpux_sys_kill(p, v, retval) + struct proc *p; + void *v; + register_t *retval; +{ + struct hpux_sys_kill_args *uap = v; + + if (SCARG(uap, signo)) { + SCARG(uap, signo) = hpuxtobsdsig(SCARG(uap, signo)); + if (SCARG(uap, signo) == 0) + SCARG(uap, signo) = NSIG; + } + return (sys_kill(p, uap, retval)); +} + +/* + * The following (sigprocmask, sigpending, sigsuspend, sigaction are + * POSIX calls. Under BSD, the library routine dereferences the sigset_t + * pointers before traping. Not so under HP-UX. + */ + +/* + * Manipulate signal mask. + * Note that we receive new mask, not pointer, + * and return old mask as return value; + * the library stub does the rest. + */ +int +hpux_sys_sigprocmask(p, v, retval) + struct proc *p; + void *v; + register_t *retval; +{ + struct hpux_sys_sigprocmask_args *uap = v; + int mask, error = 0; + hpux_sigset_t sigset; + + /* + * Copy out old mask first to ensure no errors. + * (proc sigmask should not be changed if call fails for any reason) + */ + if (SCARG(uap, oset)) { + bzero((caddr_t)&sigset, sizeof(sigset)); + sigset.sigset[0] = bsdtohpuxmask(p->p_sigmask); + if (copyout((caddr_t)&sigset, (caddr_t)SCARG(uap, oset), + sizeof(sigset))) + return (EFAULT); + } + if (SCARG(uap, set)) { + if (copyin((caddr_t)SCARG(uap, set), (caddr_t)&sigset, + sizeof(sigset))) + return (EFAULT); + mask = hpuxtobsdmask(sigset.sigset[0]); + (void) splhigh(); + switch (SCARG(uap, how)) { + case HPUXSIG_BLOCK: + p->p_sigmask |= mask &~ sigcantmask; + break; + case HPUXSIG_UNBLOCK: + p->p_sigmask &= ~mask; + break; + case HPUXSIG_SETMASK: + p->p_sigmask = mask &~ sigcantmask; + break; + default: + error = EINVAL; + break; + } + (void) spl0(); + } + return (error); +} + +int +hpux_sys_sigpending(p, v, retval) + struct proc *p; + void *v; + register_t *retval; +{ + struct hpux_sys_sigpending_args *uap = v; + hpux_sigset_t sigset; + + sigset.sigset[0] = bsdtohpuxmask(p->p_siglist); + return (copyout((caddr_t)&sigset, (caddr_t)SCARG(uap, set), + sizeof(sigset))); +} + +int +hpux_sys_sigsuspend(p, v, retval) + struct proc *p; + void *v; + register_t *retval; +{ + struct hpux_sys_sigsuspend_args *uap = v; + struct sigacts *ps = p->p_sigacts; + hpux_sigset_t sigset; + int mask; + + if (copyin((caddr_t)SCARG(uap, set), (caddr_t)&sigset, sizeof(sigset))) + return (EFAULT); + mask = hpuxtobsdmask(sigset.sigset[0]); + ps->ps_oldmask = p->p_sigmask; + ps->ps_flags |= SAS_OLDMASK; + p->p_sigmask = mask &~ sigcantmask; + (void) tsleep((caddr_t)ps, PPAUSE | PCATCH, "pause", 0); + /* always return EINTR rather than ERESTART... */ + return (EINTR); +} + +int +hpux_sys_sigaction(p, v, retval) + struct proc *p; + void *v; + register_t *retval; +{ + struct hpux_sys_sigaction_args *uap = v; + struct hpux_sigaction action; + struct sigacts *ps = p->p_sigacts; + struct hpux_sigaction *sa; + int sig; + int bit; + + sig = hpuxtobsdsig(SCARG(uap, signo)); + if (sig <= 0 || sig >= NSIG || sig == SIGKILL || sig == SIGSTOP) + return (EINVAL); + + sa = &action; + if (SCARG(uap, osa)) { + sa->sa__handler = ps->ps_sigact[sig]; + bzero((caddr_t)&sa->sa_mask, sizeof(sa->sa_mask)); + sa->sa_mask.sigset[0] = bsdtohpuxmask(ps->ps_catchmask[sig]); + bit = sigmask(sig); + sa->sa_flags = 0; + if ((ps->ps_sigonstack & bit) != 0) + sa->sa_flags |= HPUXSA_ONSTACK; + if ((ps->ps_sigreset & bit) != 0) + sa->sa_flags |= HPUXSA_RESETHAND; + if (p->p_flag & P_NOCLDSTOP) + sa->sa_flags |= HPUXSA_NOCLDSTOP; + if (p->p_flag & P_NOCLDWAIT) + sa->sa_flags |= HPUXSA_NOCLDWAIT; + if (copyout((caddr_t)sa, (caddr_t)SCARG(uap, osa), + sizeof (action))) + return (EFAULT); + } + if (SCARG(uap, nsa)) { + struct sigaction act; + + if (copyin((caddr_t)SCARG(uap, nsa), (caddr_t)sa, + sizeof (action))) + return (EFAULT); + if (sig == SIGCONT && sa->sa__handler == SIG_IGN) + return (EINVAL); + /* + * Create a sigaction struct for setsigvec + */ + act.sa_handler = sa->sa__handler; + act.sa_mask = hpuxtobsdmask(sa->sa_mask.sigset[0]); + act.sa_flags = SA_RESTART; + if (sa->sa_flags & HPUXSA_ONSTACK) + act.sa_flags |= SA_ONSTACK; + if (sa->sa_flags & HPUXSA_NOCLDSTOP) + act.sa_flags |= SA_NOCLDSTOP; + if (sa->sa_flags & HPUXSA_NOCLDWAIT) + act.sa_flags |= SA_NOCLDWAIT; + setsigvec(p, sig, &act); +#if 0 +/* XXX -- SOUSIG no longer exists, do something here */ + if (sa->sa_flags & HPUXSA_RESETHAND) + p->p_flag |= SOUSIG; /* XXX */ +#endif + } + return (0); +} + +/* signal numbers: convert from HPUX to BSD */ +int +hpuxtobsdsig(sig) + int sig; +{ + if (--sig < 0 || sig >= NSIG) + return(0); + return((int)hpuxtobsdsigmap[sig]); +} + +/* signal numbers: convert from BSD to HPUX */ +int +bsdtohpuxsig(sig) + int sig; +{ + if (--sig < 0 || sig >= NSIG) + return(0); + return((int)bsdtohpuxsigmap[sig]); +} + +/* signal masks: convert from HPUX to BSD (not pretty or fast) */ +int +hpuxtobsdmask(mask) + int mask; +{ + int nmask, sig, nsig; + + if (mask == 0 || mask == -1) + return(mask); + nmask = 0; + for (sig = 1; sig < NSIG; sig++) + if ((mask & sigmask(sig)) && (nsig = hpuxtobsdsig(sig))) + nmask |= sigmask(nsig); + return(nmask); +} + +int +bsdtohpuxmask(mask) + int mask; +{ + int nmask, sig, nsig; + + if (mask == 0 || mask == -1) + return(mask); + nmask = 0; + for (sig = 1; sig < NSIG; sig++) + if ((mask & sigmask(sig)) && (nsig = bsdtohpuxsig(sig))) + nmask |= sigmask(nsig); + return(nmask); +} + +int +hpux_sigsetreturn(struct proc *p, void *v, register_t *retval) +{ + struct hpux_sigsetreturn_args /* { + syscallarg(int) cookie; + } */ *uap = v; + +printf("hpux_sigsetreturn(%x)\n", SCARG(uap, cookie)); + return (0); +} diff --git a/sys/compat/hpux/hppa/syscalls.conf b/sys/compat/hpux/hppa/syscalls.conf new file mode 100644 index 00000000000..32145033572 --- /dev/null +++ b/sys/compat/hpux/hppa/syscalls.conf @@ -0,0 +1,12 @@ +# $OpenBSD: syscalls.conf,v 1.1 2004/07/09 21:48:21 mickey Exp $ + +sysnames="hpux_syscalls.c" +sysnumhdr="hpux_syscall.h" +syssw="hpux_sysent.c" +sysarghdr="hpux_syscallargs.h" +compatopts="" +libcompatopts="" + +switchname="hpux_sysent" +namesname="hpux_syscallnames" +constprefix="HPUX_SYS_" diff --git a/sys/compat/hpux/hppa/syscalls.master b/sys/compat/hpux/hppa/syscalls.master new file mode 100644 index 00000000000..192c8e27fda --- /dev/null +++ b/sys/compat/hpux/hppa/syscalls.master @@ -0,0 +1,661 @@ + $OpenBSD: syscalls.master,v 1.1 2004/07/09 21:48:21 mickey Exp $ + +; @(#)syscalls.master 8.1 (Berkeley) 7/19/93 + +; OpenBSD COMPAT_HPUX system call name/number "master" file. +; (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 switch definition file only. +; +; hppa syscall names (some do not match) +; http://lists.parisc-linux.org/pipermail/parisc-linux/2001-October/013957.html +; + +#include <sys/param.h> +#include <sys/systm.h> +#include <sys/signal.h> +#include <sys/mount.h> +#include <sys/exec.h> +#include <sys/syscallargs.h> + +#include <compat/hpux/hpux.h> +#include <compat/hpux/hppa/hpux_syscallargs.h> + +#include <machine/hpux_machdep.h> + +0 NOARGS { int sys_nosys(void); } syscall +1 NOARGS { int sys_exit(int rval); } +2 STD { int hpux_sys_fork(void); } +3 STD { int hpux_sys_read(int fd, char *buf, u_int nbyte); } +4 STD { int hpux_sys_write(int fd, char *buf, u_int nbyte); } +5 STD { int hpux_sys_open(char *path, int flags, int mode); } +6 NOARGS { int sys_close(int fd); } +7 STD { int hpux_sys_wait(int *status); } +8 STD { int hpux_sys_creat(char *path, int mode); } +9 NOARGS { int sys_link(char *path, char *link); } +10 STD { int hpux_sys_unlink(char *path); } +11 STD { int hpux_sys_execv(char * path, char * * argp); } +12 STD { int hpux_sys_chdir(char *path); } +13 STD { int hpux_sys_time_6x(time_t *t); } +14 STD { int hpux_sys_mknod(char *path, int mode, int dev); } +15 STD { int hpux_sys_chmod(char *path, int mode); } +16 STD { int hpux_sys_chown(char *path, int uid, int gid); } +17 NOARGS { int sys_obreak(char *nsize); } +18 UNIMPL lchmod +19 NOARGS { long compat_43_sys_lseek(int fd, long offset, \ + int whence); } +20 NOARGS { pid_t sys_getpid(void); } +21 UNIMPL mount +22 UNIMPL umount +23 NOARGS { int sys_setuid(uid_t uid); } +24 NOARGS { uid_t sys_getuid(void); } +25 STD { int hpux_sys_stime_6x(int time); } +#ifdef PTRACE +26 STD { int hpux_sys_ptrace(int req, int pid, int *addr, \ + int data); } +#else +26 UNIMPL ptrace +#endif +27 STD { int hpux_sys_alarm_6x(int deltat); } +28 UNIMPL cnx_lw_pmon_read +29 STD { int hpux_sys_pause_6x(void); } +30 STD { int hpux_sys_utime_6x(char *fname, time_t *tptr); } +31 UNIMPL stty +32 UNIMPL gtty +33 STD { int hpux_sys_access(char *path, int flags); } +34 STD { int hpux_sys_nice_6x(int nval); } +35 STD { int hpux_sys_ftime_6x(struct hpux_timeb *tp); } +36 NOARGS { int sys_sync(void); } +37 STD { int hpux_sys_kill(pid_t pid, int signo); } +38 STD { int hpux_sys_stat(char *path, struct hpux_stat *sb); } +39 STD { int hpux_sys_setpgrp_6x(void); } +40 STD { int hpux_sys_lstat(char *path, struct hpux_stat *sb); } +41 NOARGS { int sys_dup(int fd); } +42 NOARGS { int sys_opipe(void); } +43 STD { int hpux_sys_times_6x(struct tms *tms); } +44 NOARGS { int sys_profil(caddr_t samples, u_int size, \ + u_int offset, u_int scale); } + +45 UNIMPL ki_syscall +46 NOARGS { int sys_setgid(gid_t gid); } +47 NOARGS { gid_t sys_getgid(void); } +48 UNIMPL +49 UNIMPL reserved for USG +50 UNIMPL reserved for USG +51 UNIMPL acct +52 UNIMPL set_userthreadid +53 UNIMPL lwp_mutex_unlock_2 +54 STD { int hpux_sys_ioctl(int fd, int com, caddr_t data); } +55 UNIMPL reboot +56 STD { int hpux_sys_symlink(char *path, char *link); } +57 STD { int hpux_sys_utssys(struct hpux_utsname *uts, \ + int dev, int request); } +58 STD { int hpux_sys_readlink(char *path, char *buf, \ + int count); } +59 STD { int hpux_sys_execve(char *path, char **argp, \ + char **envp); } +60 NOARGS { int sys_umask(int newmask); } +61 NOARGS { int sys_chroot(char *path); } +62 STD { int hpux_sys_fcntl(int fd, int cmd, int arg); } +63 STD { int hpux_sys_ulimit(int cmd, int newlimit); } +64 UNIMPL +65 UNIMPL +66 STD { int hpux_sys_vfork(void); } +67 UNIMPL lwp_getprivate +68 UNIMPL lwp_setprivate +69 UNIMPL +70 UNIMPL +71 STD { int hpux_sys_mmap(caddr_t addr, size_t len, \ + int prot, int flags, int fd, long pos); } +72 UNIMPL +73 NOARGS { int sys_munmap(caddr_t addr, size_t len); } +74 NOARGS { int sys_mprotect(caddr_t addr, size_t len, \ + int prot); } +75 UNIMPL madvise +76 UNIMPL vhangup +77 UNIMPL swapoff +78 UNIMPL +79 NOARGS { int sys_getgroups(u_int gidsetsize, gid_t *gidset); } +80 NOARGS { int sys_setgroups(u_int gidsetsize, gid_t *gidset); } +81 STD { int hpux_sys_getpgrp2(pid_t pid); } +82 STD { int hpux_sys_setpgrp2(pid_t pid, pid_t pgid); } +83 NOARGS { int sys_setitimer(u_int which, \ + struct itimerval *itv, struct itimerval *oitv); } +84 STD { int hpux_sys_wait3(int *status, int options, \ + int rusage); } +85 UNIMPL swapon +86 NOARGS { int sys_getitimer(u_int which, \ + struct itimerval *itv); } +87 UNIMPL +88 UNIMPL +89 UNIMPL +90 NOARGS { int sys_dup2(u_int from, u_int to); } +91 UNIMPL +92 STD { int hpux_sys_fstat(int fd, struct hpux_stat *sb); } +93 NOARGS { int sys_select(u_int nd, fd_set *in, fd_set *ou, \ + fd_set *ex, struct timeval *tv); } +94 UNIMPL +95 NOARGS { int sys_fsync(int fd); } +96 UNIMPL setpriority +97 UNIMPL +98 UNIMPL +99 UNIMPL +100 UNIMPL getpriority +101 UNIMPL +102 UNIMPL +103 UNIMPL lf_send +104 UNIMPL +105 UNIMPL +106 UNIMPL +107 UNIMPL +108 STD { int hpux_sys_sigvec(int signo, struct sigvec *nsv, \ + struct sigvec *osv); } +109 STD { int hpux_sys_sigblock(int mask); } +110 STD { int hpux_sys_sigsetmask(int mask); } +111 STD { int hpux_sys_sigpause(int mask); } +112 NOARGS { int compat_43_sys_sigstack(struct sigstack *nss, \ + struct sigstack *oss); } +113 UNIMPL +114 UNIMPL +115 UNIMPL regctl +116 NOARGS { int sys_gettimeofday(struct timeval *tp); } +117 UNIMPL getrusage +118 UNIMPL +119 UNIMPL +120 STD { int hpux_sys_readv(int fd, struct iovec *iovp, \ + u_int iovcnt); } +121 STD { int hpux_sys_writev(int fd, struct iovec *iovp, \ + u_int iovcnt); } +122 NOARGS { int sys_settimeofday(struct timeval *tv, \ + struct timezone *tzp); } +123 NOARGS { int sys_fchown(int fd, int uid, int gid); } +124 NOARGS { int sys_fchmod(int fd, int mode); } +125 UNIMPL +126 NOARGS { int sys_setresuid(uid_t ruid, uid_t uide, \ + uid_t suid); } +127 NOARGS { int sys_setresgid(gid_t rgid, gid_t egid, \ + gid_t sgid); } +128 STD { int hpux_sys_rename(char *from, char *to); } +129 STD { int hpux_sys_truncate(char *path, long length); } +130 NOARGS { int compat_43_sys_ftruncate(int fd, long length); } +131 UNIMPL +132 STD { int hpux_sys_sysconf(int name); } +133 UNIMPL +134 UNIMPL +135 UNIMPL +136 STD { int hpux_sys_mkdir(char *path, int mode); } +137 STD { int hpux_sys_rmdir(char *path); } +138 UNIMPL +139 UNIMPL sigcleanup +140 UNIMPL setcore +141 UNIMPL +142 UNIMPL +143 UNIMPL +144 STD { int hpux_sys_getrlimit(u_int which, \ + struct ogetrlimit *rlp); } +145 STD { int hpux_sys_setrlimit(u_int which, \ + struct ogetrlimit *rlp); } +146 UNIMPL +147 UNIMPL lwp_self +148 UNIMPL quotactl +149 UNIMPL get_sysinfo +150 UNIMPL +151 UNIMPL privgrp +152 STD { int hpux_sys_rtprio(pid_t pid, int prio); } +153 UNIMPL plock +154 UNIMPL lf_next_scn +155 STD { int hpux_sys_lockf(int fd, int func, long size); } +#ifdef SYSVSEM +156 NOARGS { int sys_semget(key_t key, int nsems, int semflg); } +157 NOARGS { int sys___semctl(int semid, int semnum, int cmd, \ + union semun *arg); } +158 NOARGS { int sys_semop(int semid, struct sembuf *sops, \ + u_int nsops); } +#else +156 UNIMPL semget +157 UNIMPL semctl +158 UNIMPL semop +#endif +#ifdef SYSVMSG +159 NOARGS { int sys_msgget(key_t key, int msgflg); } +160 NOARGS { int sys_msgctl(int msqid, int cmd, \ + struct msqid_ds *buf); } +161 NOARGS { int sys_msgsnd(int msqid, void *msgp, size_t msgsz, \ + int msgflg); } +162 NOARGS { int sys_msgrcv(int msqid, void *msgp, size_t msgsz, \ + long msgtyp, int msgflg); } +#else +159 UNIMPL msgget +160 UNIMPL msgctl +161 UNIMPL msgsnd +162 UNIMPL msgrcv +#endif +#ifdef SYSVSHM +163 NOARGS { int sys_shmget(key_t key, int size, int shmflg); } +164 STD { int hpux_sys_shmctl(int shmid, int cmd, \ + caddr_t buf); } +165 NOARGS { int sys_shmat(int shmid, void *shmaddr, int shmflg); } +166 NOARGS { int sys_shmdt(void *shmaddr); } +#else +163 UNIMPL shmget +164 UNIMPL shmctl +165 UNIMPL shmat +166 UNIMPL shmdt +#endif +167 UNIMPL set_mem_window +168 UNIMPL nsp_init +169 UNIMPL +170 UNIMPL mkrnod +171 UNIMPL test +172 UNIMPL unsp_open +173 UNIMPL +174 STD { int hpux_sys_getcontext(char *buf, int len); } +175 UNIMPL osetcontext +176 UNIMPL bigio +177 UNIMPL pipenode +178 UNIMPL lsync +179 UNIMPL +180 UNIMPL mysite +181 UNIMPL sitels +182 UNIMPL swapclients +183 UNIMPL rmtprocess +184 UNIMPL dskless_stats +185 STD { int hpux_sys_sigprocmask(int how, \ + hpux_sigset_t *set, hpux_sigset_t *oset); } +186 STD { int hpux_sys_sigpending(hpux_sigset_t *set); } +187 STD { int hpux_sys_sigsuspend(hpux_sigset_t *set); } +188 STD { int hpux_sys_sigaction(int signo, \ + struct hpux_sigaction *nsa, \ + struct hpux_sigaction *osa); } +189 UNIMPL lw_get_thread_times +190 UNIMPL nfssvc +191 UNIMPL getfh +192 UNIMPL getdomainname +193 UNIMPL setdomainname +194 UNIMPL async_daemon +195 UNIMPL getdirentries +196 UNIMPL statfs +197 UNIMPL fstatfs +198 UNIMPL vfsmount +199 UNIMPL qmml +200 STD { int hpux_sys_waitpid(pid_t pid, int *status, \ + int options, struct rusage *rusage); } +201 UNIMPL +202 UNIMPL +203 UNIMPL +204 UNIMPL +205 UNIMPL +206 UNIMPL +207 UNIMPL +208 UNIMPL +209 UNIMPL +210 UNIMPL +211 UNIMPL +212 UNIMPL +213 UNIMPL +214 UNIMPL +215 UNIMPL +216 UNIMPL +217 UNIMPL +218 UNIMPL +219 UNIMPL +220 UNIMPL +221 UNIMPL +222 UNIMPL +223 UNIMPL +224 STD { void hpux_sigsetreturn(int cookie); } +225 UNIMPL sigsetstatemask +226 UNIMPL +227 UNIMPL cs +228 UNIMPL cds +229 UNIMPL set_no_trunc +230 UNIMPL pathconf +231 UNIMPL fpathconf +232 UNIMPL +233 UNIMPL +234 UNIMPL nfs_fcntl +235 UNIMPL ogetacl +236 UNIMPL ofgetctl +237 UNIMPL osetacl +238 UNIMPL ofsetacl +239 UNIMPL pstat +240 UNIMPL getaudid +241 UNIMPL setaudid +242 UNIMPL getaudproc +243 UNIMPL setaudproc +244 UNIMPL getevent +245 UNIMPL setevent +246 UNIMPL audwrite +247 UNIMPL audswitch +248 UNIMPL audctl +249 UNIMPL ogetaccess +250 UNIMPL fsctl +251 UNIMPL +252 UNIMPL getmount_entries +253 UNIMPL lwp_mutex_init2 +254 UNIMPL +255 UNIMPL +256 UNIMPL +257 UNIMPL +258 UNIMPL +259 UNIMPL swapfs +260 UNIMPL fss +261 UNIMPL +262 UNIMPL +263 UNIMPL +264 UNIMPL +265 UNIMPL +266 UNIMPL +267 UNIMPL tsync +268 UNIMPL getnumfds +269 NOARGS { int sys_poll(struct pollfd *fds, u_int nfds, \ + int timeout); } +270 UNIMPL getmsg +271 UNIMPL putmsg +272 NOARGS { int sys_fchdir(int fd); } +273 UNIMPL getmount_cnt +274 UNIMPL getmount_entry +275 NOARGS { int compat_43_sys_accept(int s, caddr_t name, \ + int *anamelen); } +276 NOARGS { int sys_bind(int s, caddr_t name, int namelen); } +277 NOARGS { int sys_connect(int s, caddr_t name, int namelen); } +278 NOARGS { int sys_getpeername(int fdes, caddr_t asa, \ + int *alen); } +279 NOARGS { int sys_getsockname(int fdec, caddr_t asa, \ + int *alen); } +280 NOARGS { int sys_getsockopt(int s, int level, int name, \ + void *val, socklen_t *avalsize); } +281 NOARGS { int sys_listen(int s, int backlog); } +282 NOARGS { int compat_43_sys_recv(int s, caddr_t buf, int len, \ + int flags); } +283 NOARGS { int compat_43_sys_recvfrom(int s, caddr_t buf, \ + size_t len, int flags, caddr_t from, \ + int *fromlenaddr); } +284 NOARGS { int compat_43_sys_recvmsg(int s, \ + struct omsghdr *msg, int flags); } +285 NOARGS { int compat_43_sys_send(int s, caddr_t buf, int len, \ + int flags); } +286 NOARGS { int compat_43_sys_sendmsg(int s, caddr_t msg, \ + int flags); } +287 NOARGS { int sys_sendto(int s, caddr_t buf, size_t len, \ + int flags, caddr_t to, int tolen); } +288 NOARGS { int sys_setsockopt(int s, int level, int name, \ + const void *val, socklen_t valsize); } +289 NOARGS { int sys_shutdown(int s, int how); } +290 NOARGS { int sys_socket(int domain, int type, int protocol); } +291 NOARGS { int sys_socketpair(int domain, int type, \ + int protocol, int *rsv); } +292 UNIMPL proc_open +293 UNIMPL proc_close +294 UNIMPL proc_send +295 UNIMPL proc_recv +296 UNIMPL proc_sendrecv +297 UNIMPL proc_syscall +298 UNIMPL +299 UNIMPL +300 UNIMPL +301 UNIMPL +302 UNIMPL +303 UNIMPL +304 UNIMPL +305 UNIMPL +306 UNIMPL +307 UNIMPL +308 UNIMPL +309 UNIMPL +310 UNIMPL +311 UNIMPL +#ifdef SYSVSEM +312 NOARGS { int sys___semctl(int semid, int semnum, int cmd, \ + union semun *arg); } nsemctl +#else +312 UNIMPL semctl +#endif +#ifdef SYSVMSG +313 NOARGS { int sys_msgctl(int msqid, int cmd, \ + struct msqid_ds *buf); } nmsgctl +#else +313 UNIMPL msgctl +#endif +#ifdef SYSVSHM +314 STD { int hpux_sys_nshmctl(int shmid, int cmd, \ + caddr_t buf); } +#else +314 UNIMPL shmctl +#endif +315 UNIMPL mpctl +316 UNIMPL exportfs +317 UNIMPL getpmsg +318 UNIMPL putpmsg +319 UNIMPL +320 UNIMPL msync +321 UNIMPL msleep +322 UNIMPL mwakeup +323 UNIMPL msem_init +324 UNIMPL msem_remove +325 UNIMPL adjtime +326 UNIMPL kload +327 UNIMPL fattach +328 UNIMPL fdetach +329 UNIMPL serialize +330 UNIMPL statvfs +331 UNIMPL fstatvfs +332 NOARGS { int sys_lchown(const char *path, uid_t uid, gid_t gid); } +333 UNIMPL getsid +334 UNIMPL sysfs +335 UNIMPL +336 UNIMPL +337 UNIMPL sched_setparam +338 UNIMPL sched_getparam +339 UNIMPL sched_setscheduler +340 UNIMPL sched_getscheduler +341 UNIMPL sched_yield +342 UNIMPL sched_get_priority_max +343 UNIMPL sched_get_priority_min +344 UNIMPL sched_rr_get_interval +345 UNIMPL clock_settime +346 UNIMPL clock_gettime +347 UNIMPL clock_getres +348 UNIMPL timer_create +349 UNIMPL timer_delete +350 UNIMPL timer_settime +351 UNIMPL timer_gettime +352 UNIMPL timer_getoverrun +353 NOARGS { int sys_nanosleep(const struct timespec *rqtp, \ + struct timespec *rmtp); } +354 UNIMPL toolbox +355 UNIMPL +356 UNIMPL getdents +357 UNIMPL getcontext +358 UNIMPL sysinfo +359 UNIMPL fcntl64 +360 UNIMPL ftruncate64 +361 UNIMPL fstat64 +362 UNIMPL getdirentries64 +363 UNIMPL getrlimit64 +364 UNIMPL lockf64 +365 UNIMPL lseek64 +366 UNIMPL lstat64 +367 UNIMPL mmap64 +368 UNIMPL setrlimit64 +369 UNIMPL stat64 +370 UNIMPL truncate64 +371 UNIMPL ulimit64 +372 UNIMPL pread +373 UNIMPL preadv +374 UNIMPL pwrite +375 UNIMPL pwritev +376 UNIMPL pread64 +377 UNIMPL preadv64 +378 UNIMPL pwrite64 +379 UNIMPL pwritev64 +380 UNIMPL setcontext +381 UNIMPL sigaltstack +382 UNIMPL waitid +383 UNIMPL setpgrp +384 UNIMPL recvmsg2 +385 UNIMPL sendmsg2 +386 UNIMPL socket2 +387 UNIMPL socketpair2 +388 UNIMPL setregid +389 UNIMPL lwp_create +390 UNIMPL lwp_terminate +391 UNIMPL lwp_wait +392 UNIMPL lwp_suspend +393 UNIMPL lwp_resume +394 UNIMPL +395 UNIMPL lwp_abort_syscall +396 UNIMPL lwp_info +397 UNIMPL lwp_kill +398 UNIMPL ksleep +399 UNIMPL kwakeup +400 UNIMPL +401 UNIMPL pstat_getlwp +402 UNIMPL lwp_exit +403 UNIMPL lwp_continue +404 UNIMPL getacl +405 UNIMPL fgetacl +406 UNIMPL setacl +407 UNIMPL fsetacl +408 UNIMPL getaccess +409 UNIMPL lwp_mutex_init +410 UNIMPL lwp_mutex_lock_sys +411 UNIMPL lwp_mutex_unlock +412 UNIMPL lwp_cond_init +413 UNIMPL lwp_cond_signal +414 UNIMPL lwp_cond_broadcast +415 UNIMPL lwp_cond_wait_sys +416 UNIMPL lwp_getscheduler +417 UNIMPL lwp_setscheduler +418 UNIMPL lwp_getstate +419 UNIMPL lwp_setstate +420 UNIMPL lwp_detach +421 UNIMPL mlock +422 UNIMPL munlock +423 UNIMPL mlockall +424 UNIMPL munlockall +425 UNIMPL shm_open +426 UNIMPL shm_unlink +427 UNIMPL sigqueue +428 UNIMPL sigwaitinfo +429 UNIMPL sigtimedwait +430 UNIMPL sigwait +431 UNIMPL aio_read +432 UNIMPL aio_write +433 UNIMPL lio_listio +434 UNIMPL aio_error +435 UNIMPL aio_return +436 UNIMPL aio_cancel +437 UNIMPL aio_suspend +438 UNIMPL aio_fsync +439 UNIMPL mq_open +440 UNIMPL mq_close +441 UNIMPL mq_unlink +442 UNIMPL mq_send +443 UNIMPL mq_receive +444 UNIMPL mq_notify +445 UNIMPL mq_setattr +446 UNIMPL mq_getattr +447 UNIMPL ksem_open +448 UNIMPL ksem_unlink +449 UNIMPL ksem_close +450 UNIMPL ksem_post +451 UNIMPL ksem_wait +452 UNIMPL ksem_read +453 UNIMPL ksem_trywait +454 UNIMPL lwp_rwlock_init +455 UNIMPL lwp_rwlock_destroy +456 UNIMPL lwp_rwlock_rdlock_sys +457 UNIMPL lwp_rwlock_wrlock_sys +458 UNIMPL lwp_rwlock_tryrdlock +459 UNIMPL lwp_rwlock_trywrlock +460 UNIMPL lwp_rwlock_unlock +461 UNIMPL ttrace +462 UNIMPL ttrace_wait +463 UNIMPL lf_wire_mem +464 UNIMPL lf_unwire_mem +465 UNIMPL lf_send_pin_map +466 UNIMPL lf_free_buf +467 UNIMPL lf_wait_nq +468 UNIMPL lf_wakeup_conn_q +469 UNIMPL lf_unused +470 UNIMPL lwp_sema_init +471 UNIMPL lwp_sema_post +472 UNIMPL lwp_sema_wait +473 UNIMPL lwp_sema_trywait +474 UNIMPL lwp_sema_destroy +475 UNIMPL statvfs64 +476 UNIMPL fstatvfs64 +477 UNIMPL msh_register +478 UNIMPL ptrace64 +479 UNIMPL sendfile +480 UNIMPL sendpath +481 UNIMPL sendfile64 +482 UNIMPL sendpath64 +483 UNIMPL modload +484 UNIMPL moduload +485 UNIMPL modpath +486 UNIMPL getksym +487 UNIMPL modadm +488 UNIMPL modstat +489 UNIMPL lwp_detached_exit +490 UNIMPL crashconf +491 UNIMPL siginhibit +492 UNIMPL sigenable +493 UNIMPL spuctl +494 UNIMPL zerokernelsum +495 UNIMPL nfs_kstat +496 UNIMPL aio_read64 +497 UNIMPL aio_write64 +498 UNIMPL aio_error64 +499 UNIMPL aio_return64 +500 UNIMPL aio_cancel64 +501 UNIMPL aio_suspend64 +502 UNIMPL aio_fsync64 +503 UNIMPL lio_listio64 +504 UNIMPL recv2 +505 UNIMPL recvfrom2 +506 UNIMPL send2 +507 UNIMPL sendto2 +508 UNIMPL acl +509 UNIMPL __cnx_p2p_ctl +510 UNIMPL __cnx_gsched_ctl +511 UNIMPL __cnx_pmon_ctl +512 UNIMPL mem_res_grp +513 UNIMPL fabric +514 UNIMPL diagsyscall +515 UNIMPL tuneinfo +516 UNIMPL gettune +517 UNIMPL settune +518 UNIMPL pset_create +519 UNIMPL pset_destroy +520 UNIMPL pset_assign +521 UNIMPL pset_bind +522 UNIMPL pset_getattr +523 UNIMPL pset_setattr +524 UNIMPL pset_ctl +525 UNIMPL pset_rtctl |