make signal array handling uniform, and put signal arrays in a separate
file. This is simular to errno array handling.
This commit is contained in:
parent
83c2f7aaf5
commit
ac29fb3782
@ -1,4 +1,4 @@
|
||||
# $NetBSD: files.hpux,v 1.7 2000/12/01 19:15:12 jdolecek Exp $
|
||||
# $NetBSD: files.hpux,v 1.8 2002/03/31 22:22:43 christos Exp $
|
||||
#
|
||||
# Config file description for machine-independent HPUX compat code.
|
||||
# Included by ports that need it.
|
||||
@ -14,6 +14,7 @@ file compat/hpux/hpux_exec_aout.c compat_hpux & exec_aout
|
||||
file compat/hpux/hpux_ipc.c compat_hpux
|
||||
file compat/hpux/hpux_net.c compat_hpux
|
||||
file compat/hpux/hpux_sig.c compat_hpux
|
||||
file compat/hpux/hpux_signo.c compat_hpux
|
||||
file compat/hpux/hpux_syscalls.c compat_hpux
|
||||
file compat/hpux/hpux_sysent.c compat_hpux
|
||||
file compat/hpux/hpux_tty.c compat_hpux
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: hpux_sig.c,v 1.21 2001/11/13 02:08:15 lukem Exp $ */
|
||||
/* $NetBSD: hpux_sig.c,v 1.22 2002/03/31 22:22:43 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
@ -47,7 +47,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: hpux_sig.c,v 1.21 2001/11/13 02:08:15 lukem Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: hpux_sig.c,v 1.22 2002/03/31 22:22:43 christos Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -61,21 +61,8 @@ __KERNEL_RCSID(0, "$NetBSD: hpux_sig.c,v 1.21 2001/11/13 02:08:15 lukem Exp $");
|
||||
#include <compat/hpux/hpux_sig.h>
|
||||
#include <compat/hpux/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
|
||||
};
|
||||
extern const unsigned char native_to_hpux_signo[];
|
||||
extern const unsigned char hpux_to_native_signo[];
|
||||
|
||||
/*
|
||||
* XXX: In addition to mapping the signal number we also have
|
||||
@ -406,9 +393,9 @@ int
|
||||
hpuxtobsdsig(sig)
|
||||
int sig;
|
||||
{
|
||||
if (--sig < 0 || sig >= NSIG)
|
||||
if (sig < 0 || sig >= NSIG)
|
||||
return(0);
|
||||
return((int)hpuxtobsdsigmap[sig]);
|
||||
return hpux_to_native_signo[sig];
|
||||
}
|
||||
|
||||
/* signal numbers: convert from BSD to HPUX */
|
||||
@ -416,9 +403,9 @@ int
|
||||
bsdtohpuxsig(sig)
|
||||
int sig;
|
||||
{
|
||||
if (--sig < 0 || sig >= NSIG)
|
||||
if (sig < 0 || sig >= NSIG)
|
||||
return(0);
|
||||
return((int)bsdtohpuxsigmap[sig]);
|
||||
return native_to_hpux_signo[sig];
|
||||
}
|
||||
|
||||
/* signal masks: convert from HPUX to BSD (not pretty or fast) */
|
||||
|
67
sys/compat/hpux/hpux_signo.c
Normal file
67
sys/compat/hpux/hpux_signo.c
Normal file
@ -0,0 +1,67 @@
|
||||
/* $NetBSD: hpux_signo.c,v 1.1 2002/03/31 22:22:43 christos Exp $ */
|
||||
|
||||
/*
|
||||
* 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. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the University of
|
||||
* California, Berkeley and its contributors.
|
||||
* 4. 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
|
||||
*/
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: hpux_signo.c,v 1.1 2002/03/31 22:22:43 christos Exp $");
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/signal.h>
|
||||
|
||||
|
||||
/* indexed by HPUX signal number */
|
||||
const int hpux_to_native_signo[NSIG] = {
|
||||
0,
|
||||
/*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 */
|
||||
const int native_to_hpux_signo[NSIG] = {
|
||||
0,
|
||||
/*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
|
||||
};
|
@ -1,4 +1,4 @@
|
||||
# $NetBSD: files.ibcs2,v 1.7 2000/12/01 19:17:41 jdolecek Exp $
|
||||
# $NetBSD: files.ibcs2,v 1.8 2002/03/31 22:22:44 christos Exp $
|
||||
#
|
||||
# Config file description for machine-independent IBCS-2 compat code.
|
||||
# Included by ports that need it.
|
||||
@ -16,6 +16,7 @@ file compat/ibcs2/ibcs2_ioctl.c compat_ibcs2
|
||||
file compat/ibcs2/ibcs2_ipc.c compat_ibcs2
|
||||
file compat/ibcs2/ibcs2_misc.c compat_ibcs2
|
||||
file compat/ibcs2/ibcs2_signal.c compat_ibcs2
|
||||
file compat/ibcs2/ibcs2_signo.c compat_ibcs2
|
||||
file compat/ibcs2/ibcs2_socksys.c compat_ibcs2
|
||||
file compat/ibcs2/ibcs2_stat.c compat_ibcs2
|
||||
file compat/ibcs2/ibcs2_syscalls.c compat_ibcs2
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ibcs2_signal.c,v 1.14 2001/11/13 02:08:27 lukem Exp $ */
|
||||
/* $NetBSD: ibcs2_signal.c,v 1.15 2002/03/31 22:22:44 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995 Scott Bartram
|
||||
@ -28,7 +28,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ibcs2_signal.c,v 1.14 2001/11/13 02:08:27 lukem Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ibcs2_signal.c,v 1.15 2002/03/31 22:22:44 christos Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -54,76 +54,8 @@ __KERNEL_RCSID(0, "$NetBSD: ibcs2_signal.c,v 1.14 2001/11/13 02:08:27 lukem Exp
|
||||
#define ibcs2_sigismember(s, n) (*(s) & ibcs2_sigmask(n))
|
||||
#define ibcs2_sigaddset(s, n) (*(s) |= ibcs2_sigmask(n))
|
||||
|
||||
int const native_to_ibcs2_sig[NSIG] = {
|
||||
0, /* 0 */
|
||||
IBCS2_SIGHUP, /* 1 */
|
||||
IBCS2_SIGINT, /* 2 */
|
||||
IBCS2_SIGQUIT, /* 3 */
|
||||
IBCS2_SIGILL, /* 4 */
|
||||
IBCS2_SIGTRAP, /* 5 */
|
||||
IBCS2_SIGABRT, /* 6 */
|
||||
IBCS2_SIGEMT, /* 7 */
|
||||
IBCS2_SIGFPE, /* 8 */
|
||||
IBCS2_SIGKILL, /* 9 */
|
||||
IBCS2_SIGBUS, /* 10 */
|
||||
IBCS2_SIGSEGV, /* 11 */
|
||||
IBCS2_SIGSYS, /* 12 */
|
||||
IBCS2_SIGPIPE, /* 13 */
|
||||
IBCS2_SIGALRM, /* 14 */
|
||||
IBCS2_SIGTERM, /* 15 */
|
||||
0, /* 16 - SIGURG */
|
||||
IBCS2_SIGSTOP, /* 17 */
|
||||
IBCS2_SIGTSTP, /* 18 */
|
||||
IBCS2_SIGCONT, /* 19 */
|
||||
IBCS2_SIGCLD, /* 20 */
|
||||
IBCS2_SIGTTIN, /* 21 */
|
||||
IBCS2_SIGTTOU, /* 22 */
|
||||
IBCS2_SIGPOLL, /* 23 */
|
||||
IBCS2_SIGXCPU, /* 24 */
|
||||
IBCS2_SIGXFSZ, /* 25 */
|
||||
IBCS2_SIGVTALRM, /* 26 */
|
||||
IBCS2_SIGPROF, /* 27 */
|
||||
IBCS2_SIGWINCH, /* 28 */
|
||||
0, /* 29 - SIGINFO */
|
||||
IBCS2_SIGUSR1, /* 30 */
|
||||
IBCS2_SIGUSR2, /* 31 */
|
||||
IBCS2_SIGPWR, /* 32 */
|
||||
};
|
||||
|
||||
int const ibcs2_to_native_sig[IBCS2_NSIG] = {
|
||||
0, /* 0 */
|
||||
SIGHUP, /* 1 */
|
||||
SIGINT, /* 2 */
|
||||
SIGQUIT, /* 3 */
|
||||
SIGILL, /* 4 */
|
||||
SIGTRAP, /* 5 */
|
||||
SIGABRT, /* 6 */
|
||||
SIGEMT, /* 7 */
|
||||
SIGFPE, /* 8 */
|
||||
SIGKILL, /* 9 */
|
||||
SIGBUS, /* 10 */
|
||||
SIGSEGV, /* 11 */
|
||||
SIGSYS, /* 12 */
|
||||
SIGPIPE, /* 13 */
|
||||
SIGALRM, /* 14 */
|
||||
SIGTERM, /* 15 */
|
||||
SIGUSR1, /* 16 */
|
||||
SIGUSR2, /* 17 */
|
||||
SIGCHLD, /* 18 */
|
||||
SIGPWR, /* 19 */
|
||||
SIGWINCH, /* 20 */
|
||||
0, /* 21 - SIGPHONE */
|
||||
SIGIO, /* 22 */
|
||||
SIGSTOP, /* 23 */
|
||||
SIGTSTP, /* 24 */
|
||||
SIGCONT, /* 25 */
|
||||
SIGTTIN, /* 26 */
|
||||
SIGTTOU, /* 27 */
|
||||
SIGVTALRM, /* 28 */
|
||||
SIGPROF, /* 29 */
|
||||
SIGXCPU, /* 30 */
|
||||
SIGXFSZ, /* 31 */
|
||||
};
|
||||
extern const int native_to_ibcs2_signo[];
|
||||
extern const int ibcs2_to_native_signo[];
|
||||
|
||||
void ibcs2_to_native_sigaction __P((const struct ibcs2_sigaction *, struct sigaction *));
|
||||
void native_to_ibcs2_sigaction __P((const struct sigaction *, struct ibcs2_sigaction *));
|
||||
@ -140,7 +72,7 @@ ibcs2_to_native_sigset(iss, bss)
|
||||
sigemptyset(bss);
|
||||
for (i = 1; i < IBCS2_NSIG; i++) {
|
||||
if (ibcs2_sigismember(iss, i)) {
|
||||
newsig = ibcs2_to_native_sig[i];
|
||||
newsig = ibcs2_to_native_signo[i];
|
||||
if (newsig)
|
||||
sigaddset(bss, newsig);
|
||||
}
|
||||
@ -157,7 +89,7 @@ native_to_ibcs2_sigset(bss, iss)
|
||||
ibcs2_sigemptyset(iss);
|
||||
for (i = 1; i < NSIG; i++) {
|
||||
if (sigismember(bss, i)) {
|
||||
newsig = native_to_ibcs2_sig[i];
|
||||
newsig = native_to_ibcs2_signo[i];
|
||||
if (newsig)
|
||||
ibcs2_sigaddset(iss, newsig);
|
||||
}
|
||||
@ -265,7 +197,7 @@ ibcs2_sys_sigaction(p, v, retval)
|
||||
return (error);
|
||||
ibcs2_to_native_sigaction(&nisa, &nbsa);
|
||||
}
|
||||
error = sigaction1(p, ibcs2_to_native_sig[SCARG(uap, signum)],
|
||||
error = sigaction1(p, ibcs2_to_native_signo[SCARG(uap, signum)],
|
||||
SCARG(uap, nsa) ? &nbsa : 0, SCARG(uap, osa) ? &obsa : 0);
|
||||
if (error)
|
||||
return (error);
|
||||
@ -321,7 +253,7 @@ ibcs2_sys_sigsys(p, v, retval)
|
||||
syscallarg(int) sig;
|
||||
syscallarg(ibcs2_sig_t) fp;
|
||||
} */ *uap = v;
|
||||
int signum = ibcs2_to_native_sig[IBCS2_SIGNO(SCARG(uap, sig))];
|
||||
int signum = ibcs2_to_native_signo[IBCS2_SIGNO(SCARG(uap, sig))];
|
||||
struct sigaction nbsa, obsa;
|
||||
sigset_t ss;
|
||||
int error;
|
||||
@ -484,6 +416,6 @@ ibcs2_sys_kill(p, v, retval)
|
||||
struct sys_kill_args ka;
|
||||
|
||||
SCARG(&ka, pid) = SCARG(uap, pid);
|
||||
SCARG(&ka, signum) = ibcs2_to_native_sig[SCARG(uap, signo)];
|
||||
SCARG(&ka, signum) = ibcs2_to_native_signo[SCARG(uap, signo)];
|
||||
return sys_kill(p, &ka, retval);
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ibcs2_signal.h,v 1.10 2001/01/18 20:28:25 jdolecek Exp $ */
|
||||
/* $NetBSD: ibcs2_signal.h,v 1.11 2002/03/31 22:22:44 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994, 1995 Scott Bartram
|
||||
@ -121,7 +121,7 @@ struct ibcs2_sigaltstack {
|
||||
#define IBCS2_SS_DISABLE 0x00000002
|
||||
#define IBCS2_SS_ALLBITS 0x00000003
|
||||
|
||||
extern const int native_to_ibcs2_sig[];
|
||||
extern const int native_to_ibcs2_signo[];
|
||||
void ibcs2_to_native_sigset __P((const ibcs2_sigset_t *, sigset_t *));
|
||||
void native_to_ibcs2_sigset __P((const sigset_t *, ibcs2_sigset_t *));
|
||||
|
||||
|
108
sys/compat/ibcs2/ibcs2_signo.c
Normal file
108
sys/compat/ibcs2/ibcs2_signo.c
Normal file
@ -0,0 +1,108 @@
|
||||
/* $NetBSD: ibcs2_signo.c,v 1.1 2002/03/31 22:22:44 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995 Scott Bartram
|
||||
* All rights reserved.
|
||||
*
|
||||
* 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. 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.
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ibcs2_signo.c,v 1.1 2002/03/31 22:22:44 christos Exp $");
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/signal.h>
|
||||
|
||||
#include <compat/ibcs2/ibcs2_types.h>
|
||||
#include <compat/ibcs2/ibcs2_signal.h>
|
||||
|
||||
const int native_to_ibcs2_signo[NSIG] = {
|
||||
0, /* 0 */
|
||||
IBCS2_SIGHUP, /* 1 */
|
||||
IBCS2_SIGINT, /* 2 */
|
||||
IBCS2_SIGQUIT, /* 3 */
|
||||
IBCS2_SIGILL, /* 4 */
|
||||
IBCS2_SIGTRAP, /* 5 */
|
||||
IBCS2_SIGABRT, /* 6 */
|
||||
IBCS2_SIGEMT, /* 7 */
|
||||
IBCS2_SIGFPE, /* 8 */
|
||||
IBCS2_SIGKILL, /* 9 */
|
||||
IBCS2_SIGBUS, /* 10 */
|
||||
IBCS2_SIGSEGV, /* 11 */
|
||||
IBCS2_SIGSYS, /* 12 */
|
||||
IBCS2_SIGPIPE, /* 13 */
|
||||
IBCS2_SIGALRM, /* 14 */
|
||||
IBCS2_SIGTERM, /* 15 */
|
||||
0, /* 16 - SIGURG */
|
||||
IBCS2_SIGSTOP, /* 17 */
|
||||
IBCS2_SIGTSTP, /* 18 */
|
||||
IBCS2_SIGCONT, /* 19 */
|
||||
IBCS2_SIGCLD, /* 20 */
|
||||
IBCS2_SIGTTIN, /* 21 */
|
||||
IBCS2_SIGTTOU, /* 22 */
|
||||
IBCS2_SIGPOLL, /* 23 */
|
||||
IBCS2_SIGXCPU, /* 24 */
|
||||
IBCS2_SIGXFSZ, /* 25 */
|
||||
IBCS2_SIGVTALRM, /* 26 */
|
||||
IBCS2_SIGPROF, /* 27 */
|
||||
IBCS2_SIGWINCH, /* 28 */
|
||||
0, /* 29 - SIGINFO */
|
||||
IBCS2_SIGUSR1, /* 30 */
|
||||
IBCS2_SIGUSR2, /* 31 */
|
||||
IBCS2_SIGPWR, /* 32 */
|
||||
};
|
||||
|
||||
const int ibcs2_to_native_signo[IBCS2_NSIG] = {
|
||||
0, /* 0 */
|
||||
SIGHUP, /* 1 */
|
||||
SIGINT, /* 2 */
|
||||
SIGQUIT, /* 3 */
|
||||
SIGILL, /* 4 */
|
||||
SIGTRAP, /* 5 */
|
||||
SIGABRT, /* 6 */
|
||||
SIGEMT, /* 7 */
|
||||
SIGFPE, /* 8 */
|
||||
SIGKILL, /* 9 */
|
||||
SIGBUS, /* 10 */
|
||||
SIGSEGV, /* 11 */
|
||||
SIGSYS, /* 12 */
|
||||
SIGPIPE, /* 13 */
|
||||
SIGALRM, /* 14 */
|
||||
SIGTERM, /* 15 */
|
||||
SIGUSR1, /* 16 */
|
||||
SIGUSR2, /* 17 */
|
||||
SIGCHLD, /* 18 */
|
||||
SIGPWR, /* 19 */
|
||||
SIGWINCH, /* 20 */
|
||||
0, /* 21 - SIGPHONE */
|
||||
SIGIO, /* 22 */
|
||||
SIGSTOP, /* 23 */
|
||||
SIGTSTP, /* 24 */
|
||||
SIGCONT, /* 25 */
|
||||
SIGTTIN, /* 26 */
|
||||
SIGTTOU, /* 27 */
|
||||
SIGVTALRM, /* 28 */
|
||||
SIGPROF, /* 29 */
|
||||
SIGXCPU, /* 30 */
|
||||
SIGXFSZ, /* 31 */
|
||||
};
|
@ -1,4 +1,4 @@
|
||||
# $NetBSD: files.irix,v 1.17 2002/03/16 13:29:42 manu Exp $
|
||||
# $NetBSD: files.irix,v 1.18 2002/03/31 22:22:44 christos Exp $
|
||||
#
|
||||
|
||||
file arch/mips/mips/irix_syscall.c compat_irix
|
||||
@ -27,6 +27,7 @@ file compat/svr4/svr4_fcntl.c compat_irix
|
||||
file compat/svr4/svr4_misc.c compat_irix
|
||||
file compat/svr4/svr4_stat.c compat_irix
|
||||
file compat/svr4/svr4_signal.c compat_irix
|
||||
file compat/svr4/svr4_signo.c compat_irix
|
||||
file compat/svr4/svr4_ipc.c compat_irix
|
||||
file compat/svr4/svr4_ioctl.c compat_irix
|
||||
file compat/svr4/svr4_stream.c compat_irix
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: irix_signal.c,v 1.8 2002/03/26 22:59:32 manu Exp $ */
|
||||
/* $NetBSD: irix_signal.c,v 1.9 2002/03/31 22:22:44 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1994, 2001-2002 The NetBSD Foundation, Inc.
|
||||
@ -37,7 +37,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: irix_signal.c,v 1.8 2002/03/26 22:59:32 manu Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: irix_signal.c,v 1.9 2002/03/31 22:22:44 christos Exp $");
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/signal.h>
|
||||
@ -65,8 +65,8 @@ __KERNEL_RCSID(0, "$NetBSD: irix_signal.c,v 1.8 2002/03/26 22:59:32 manu Exp $")
|
||||
#include <compat/irix/irix_signal.h>
|
||||
#include <compat/irix/irix_syscallargs.h>
|
||||
|
||||
extern const int native_to_svr4_sig[];
|
||||
extern const int svr4_to_native_sig[];
|
||||
extern const int native_to_svr4_signo[];
|
||||
extern const int svr4_to_native_signo[];
|
||||
|
||||
static int irix_setinfo __P((struct proc *, int, irix_irix5_siginfo_t *));
|
||||
|
||||
@ -111,7 +111,7 @@ irix_setinfo(p, st, s)
|
||||
} else if (WIFSTOPPED(st)) {
|
||||
sig = WSTOPSIG(st);
|
||||
if (sig >= 0 && sig < NSIG)
|
||||
i.isi_status = native_to_svr4_sig[sig];
|
||||
i.isi_status = native_to_svr4_signo[sig];
|
||||
|
||||
if (i.isi_status == SVR4_SIGCONT)
|
||||
i.isi_code = SVR4_CLD_CONTINUED;
|
||||
@ -120,7 +120,7 @@ irix_setinfo(p, st, s)
|
||||
} else {
|
||||
sig = WTERMSIG(st);
|
||||
if (sig >= 0 && sig < NSIG)
|
||||
i.isi_status = native_to_svr4_sig[sig];
|
||||
i.isi_status = native_to_svr4_signo[sig];
|
||||
|
||||
if (WCOREDUMP(st))
|
||||
i.isi_code = SVR4_CLD_DUMPED;
|
||||
@ -142,7 +142,7 @@ native_to_irix_sigset(bss, sss)
|
||||
irix_sigemptyset(sss);
|
||||
for (i = 1; i < NSIG; i++) {
|
||||
if (sigismember(bss, i)) {
|
||||
newsig = native_to_svr4_sig[i];
|
||||
newsig = native_to_svr4_signo[i];
|
||||
if (newsig)
|
||||
irix_sigaddset(sss, newsig);
|
||||
}
|
||||
@ -159,7 +159,7 @@ irix_to_native_sigset(sss, bss)
|
||||
sigemptyset(bss);
|
||||
for (i = 1; i < SVR4_NSIG; i++) {
|
||||
if (irix_sigismember(sss, i)) {
|
||||
newsig = svr4_to_native_sig[i];
|
||||
newsig = svr4_to_native_signo[i];
|
||||
if (newsig)
|
||||
sigaddset(bss, newsig);
|
||||
}
|
||||
@ -252,7 +252,7 @@ irix_sendsig(catcher, sig, mask, code) /* XXX Check me */
|
||||
}
|
||||
|
||||
/* Set up the registers to return to sigcode. */
|
||||
f->f_regs[A0] = native_to_svr4_sig[sig];
|
||||
f->f_regs[A0] = native_to_svr4_signo[sig];
|
||||
f->f_regs[A1] = 0;
|
||||
f->f_regs[A2] = (unsigned long)fp;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: linux_machdep.c,v 1.22 2002/03/23 05:00:04 chs Exp $ */
|
||||
/* $NetBSD: linux_machdep.c,v 1.23 2002/03/31 22:22:45 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
@ -42,7 +42,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.22 2002/03/23 05:00:04 chs Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.23 2002/03/31 22:22:45 christos Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -344,7 +344,7 @@ linux_sendsig(catcher, sig, mask, code)
|
||||
|
||||
/* Signal handler for trampoline code */
|
||||
tf->tf_regs[FRAME_T12] = (u_int64_t)catcher;
|
||||
tf->tf_regs[FRAME_A0] = native_to_linux_sig[sig];
|
||||
tf->tf_regs[FRAME_A0] = native_to_linux_signo[sig];
|
||||
|
||||
/*
|
||||
* Linux has a custom restorer option. To support it we would
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: linux_sigarray.c,v 1.6 2001/11/13 02:08:34 lukem Exp $ */
|
||||
/* $NetBSD: linux_sigarray.c,v 1.7 2002/03/31 22:22:45 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
@ -37,7 +37,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_sigarray.c,v 1.6 2001/11/13 02:08:34 lukem Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_sigarray.c,v 1.7 2002/03/31 22:22:45 christos Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -46,7 +46,7 @@ __KERNEL_RCSID(0, "$NetBSD: linux_sigarray.c,v 1.6 2001/11/13 02:08:34 lukem Exp
|
||||
|
||||
#include <compat/linux/common/linux_signal.h>
|
||||
|
||||
const int linux_to_native_sig[LINUX__NSIG] = {
|
||||
const int linux_to_native_signo[LINUX__NSIG] = {
|
||||
0,
|
||||
SIGHUP, /* 1 */
|
||||
SIGINT,
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: linux_machdep.c,v 1.6 2002/02/17 23:05:08 bjh21 Exp $ */
|
||||
/* $NetBSD: linux_machdep.c,v 1.7 2002/03/31 22:22:45 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1995, 2000 The NetBSD Foundation, Inc.
|
||||
@ -38,7 +38,7 @@
|
||||
|
||||
#include <sys/param.h>
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.6 2002/02/17 23:05:08 bjh21 Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.7 2002/03/31 22:22:45 christos Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -176,7 +176,7 @@ linux_sendsig(catcher, sig, mask, code)
|
||||
/*
|
||||
* Build context to run handler in.
|
||||
*/
|
||||
tf->tf_r0 = native_to_linux_sig[sig];
|
||||
tf->tf_r0 = native_to_linux_signo[sig];
|
||||
tf->tf_r1 = 0; /* XXX Should be a siginfo_t */
|
||||
tf->tf_r2 = 0;
|
||||
tf->tf_r3 = (register_t)catcher;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: linux_sigarray.c,v 1.1 2002/01/14 23:14:39 bjh21 Exp $ */
|
||||
/* $NetBSD: linux_sigarray.c,v 1.2 2002/03/31 22:22:45 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
|
||||
@ -37,7 +37,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_sigarray.c,v 1.1 2002/01/14 23:14:39 bjh21 Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_sigarray.c,v 1.2 2002/03/31 22:22:45 christos Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -46,7 +46,7 @@ __KERNEL_RCSID(0, "$NetBSD: linux_sigarray.c,v 1.1 2002/01/14 23:14:39 bjh21 Exp
|
||||
|
||||
#include <compat/linux/common/linux_signal.h>
|
||||
|
||||
int const linux_to_native_sig[LINUX__NSIG] = {
|
||||
int const linux_to_native_signo[LINUX__NSIG] = {
|
||||
0,
|
||||
SIGHUP,
|
||||
SIGINT,
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: linux_machdep.c,v 1.73 2002/03/29 17:01:49 christos Exp $ */
|
||||
/* $NetBSD: linux_machdep.c,v 1.74 2002/03/31 22:22:45 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1995, 2000 The NetBSD Foundation, Inc.
|
||||
@ -37,7 +37,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.73 2002/03/29 17:01:49 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.74 2002/03/31 22:22:45 christos Exp $");
|
||||
|
||||
#if defined(_KERNEL_OPT)
|
||||
#include "opt_vm86.h"
|
||||
@ -213,7 +213,7 @@ linux_sendsig(catcher, sig, mask, code)
|
||||
|
||||
/* Build stack frame for signal trampoline. */
|
||||
frame.sf_handler = catcher;
|
||||
frame.sf_sig = native_to_linux_sig[sig];
|
||||
frame.sf_sig = native_to_linux_signo[sig];
|
||||
|
||||
/* Save register context. */
|
||||
#ifdef VM86
|
||||
@ -770,9 +770,9 @@ linux_machdepioctl(p, v, retval)
|
||||
if ((error = copyin(SCARG(uap, data), (caddr_t)&lvt,
|
||||
sizeof (struct vt_mode))))
|
||||
return error;
|
||||
lvt.relsig = native_to_linux_sig[lvt.relsig];
|
||||
lvt.acqsig = native_to_linux_sig[lvt.acqsig];
|
||||
lvt.frsig = native_to_linux_sig[lvt.frsig];
|
||||
lvt.relsig = native_to_linux_signo[lvt.relsig];
|
||||
lvt.acqsig = native_to_linux_signo[lvt.acqsig];
|
||||
lvt.frsig = native_to_linux_signo[lvt.frsig];
|
||||
return copyout((caddr_t)&lvt, SCARG(uap, data),
|
||||
sizeof (struct vt_mode));
|
||||
case LINUX_VT_SETMODE:
|
||||
@ -780,9 +780,9 @@ linux_machdepioctl(p, v, retval)
|
||||
if ((error = copyin(SCARG(uap, data), (caddr_t)&lvt,
|
||||
sizeof (struct vt_mode))))
|
||||
return error;
|
||||
lvt.relsig = linux_to_native_sig[lvt.relsig];
|
||||
lvt.acqsig = linux_to_native_sig[lvt.acqsig];
|
||||
lvt.frsig = linux_to_native_sig[lvt.frsig];
|
||||
lvt.relsig = linux_to_native_signo[lvt.relsig];
|
||||
lvt.acqsig = linux_to_native_signo[lvt.acqsig];
|
||||
lvt.frsig = linux_to_native_signo[lvt.frsig];
|
||||
sg = stackgap_init(p, 0);
|
||||
bvtp = stackgap_alloc(p, &sg, sizeof (struct vt_mode));
|
||||
if ((error = copyout(&lvt, bvtp, sizeof (struct vt_mode))))
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: linux_sigarray.c,v 1.20 2002/03/19 20:51:59 christos Exp $ */
|
||||
/* $NetBSD: linux_sigarray.c,v 1.21 2002/03/31 22:22:45 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
|
||||
@ -37,7 +37,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_sigarray.c,v 1.20 2002/03/19 20:51:59 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_sigarray.c,v 1.21 2002/03/31 22:22:45 christos Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -46,7 +46,7 @@ __KERNEL_RCSID(0, "$NetBSD: linux_sigarray.c,v 1.20 2002/03/19 20:51:59 christos
|
||||
|
||||
#include <compat/linux/common/linux_signal.h>
|
||||
|
||||
int const linux_to_native_sig[LINUX__NSIG] = {
|
||||
int const linux_to_native_signo[LINUX__NSIG] = {
|
||||
0, /* 0 */
|
||||
SIGHUP, /* 1 */
|
||||
SIGINT, /* 2 */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: linux_machdep.c,v 1.11 2002/02/19 22:42:25 is Exp $ */
|
||||
/* $NetBSD: linux_machdep.c,v 1.12 2002/03/31 22:22:46 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
@ -37,7 +37,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.11 2002/02/19 22:42:25 is Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.12 2002/03/31 22:22:46 christos Exp $");
|
||||
|
||||
#define COMPAT_LINUX 1
|
||||
|
||||
@ -131,7 +131,7 @@ setup_linux_sigframe(frame, sig, mask, usp)
|
||||
|
||||
/* Build stack frame. */
|
||||
kf.sf_psigtramp = fp->sf_sigtramp; /* return addr for handler */
|
||||
kf.sf_signum = native_to_linux_sig[sig];
|
||||
kf.sf_signum = native_to_linux_signo[sig];
|
||||
kf.sf_code = frame->f_vector; /* Does anyone use it? */
|
||||
kf.sf_scp = &fp->sf_c.c_sc;
|
||||
|
||||
@ -291,7 +291,7 @@ setup_linux_rt_sigframe(frame, sig, mask, usp, p)
|
||||
|
||||
/* Build stack frame. */
|
||||
kf.sf_psigtramp = fp->sf_sigtramp; /* return addr for handler */
|
||||
kf.sf_signum = native_to_linux_sig[sig];
|
||||
kf.sf_signum = native_to_linux_signo[sig];
|
||||
kf.sf_pinfo = &fp->sf_info;
|
||||
kf.sf_puc = &fp->sf_uc;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: linux_sigarray.c,v 1.4 2001/11/13 02:08:42 lukem Exp $ */
|
||||
/* $NetBSD: linux_sigarray.c,v 1.5 2002/03/31 22:22:46 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
|
||||
@ -37,7 +37,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_sigarray.c,v 1.4 2001/11/13 02:08:42 lukem Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_sigarray.c,v 1.5 2002/03/31 22:22:46 christos Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -46,7 +46,7 @@ __KERNEL_RCSID(0, "$NetBSD: linux_sigarray.c,v 1.4 2001/11/13 02:08:42 lukem Exp
|
||||
|
||||
#include <compat/linux/common/linux_signal.h>
|
||||
|
||||
const int linux_to_native_sig[LINUX__NSIG] = {
|
||||
const int linux_to_native_signo[LINUX__NSIG] = {
|
||||
0,
|
||||
SIGHUP,
|
||||
SIGINT,
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: linux_machdep.c,v 1.11 2002/02/17 23:18:38 rafal Exp $ */
|
||||
/* $NetBSD: linux_machdep.c,v 1.12 2002/03/31 22:22:46 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1995, 2000, 2001 The NetBSD Foundation, Inc.
|
||||
@ -37,7 +37,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.11 2002/02/17 23:18:38 rafal Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.12 2002/03/31 22:22:46 christos Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -207,7 +207,7 @@ linux_sendsig(catcher, sig, mask, code) /* XXX Check me */
|
||||
}
|
||||
|
||||
/* Set up the registers to return to sigcode. */
|
||||
f->f_regs[A0] = native_to_linux_sig[sig];
|
||||
f->f_regs[A0] = native_to_linux_signo[sig];
|
||||
f->f_regs[A1] = 0;
|
||||
f->f_regs[A2] = (unsigned long)&fp->lsf_sc;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: linux_sigarray.c,v 1.3 2001/11/13 02:08:44 lukem Exp $ */
|
||||
/* $NetBSD: linux_sigarray.c,v 1.4 2002/03/31 22:22:46 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1995, 1998, 2001 The NetBSD Foundation, Inc.
|
||||
@ -37,7 +37,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_sigarray.c,v 1.3 2001/11/13 02:08:44 lukem Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_sigarray.c,v 1.4 2002/03/31 22:22:46 christos Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -49,7 +49,7 @@ __KERNEL_RCSID(0, "$NetBSD: linux_sigarray.c,v 1.3 2001/11/13 02:08:44 lukem Exp
|
||||
/*
|
||||
* From Linux's include/asm-mips/signal.h
|
||||
*/
|
||||
const int linux_to_native_sig[LINUX__NSIG] = {
|
||||
const int linux_to_native_signo[LINUX__NSIG] = {
|
||||
0, /* 0 */
|
||||
SIGHUP,
|
||||
SIGINT,
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: linux_machdep.c,v 1.13 2002/02/15 16:48:02 christos Exp $ */
|
||||
/* $NetBSD: linux_machdep.c,v 1.14 2002/03/31 22:22:46 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1995, 2000, 2001 The NetBSD Foundation, Inc.
|
||||
@ -37,7 +37,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.13 2002/02/15 16:48:02 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.14 2002/03/31 22:22:46 christos Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -167,7 +167,7 @@ linux_sendsig(catcher, sig, mask, code) /* XXX Check me */
|
||||
* Prepare a sigcontext for later.
|
||||
*/
|
||||
memset(&sc, 0, sizeof sc);
|
||||
sc.lsignal = (int)native_to_linux_sig[sig];
|
||||
sc.lsignal = (int)native_to_linux_signo[sig];
|
||||
sc.lhandler = (unsigned long)catcher;
|
||||
native_to_linux_old_extra_sigset(&sc.lmask, &sc._unused[3], mask);
|
||||
sc.lregs = (struct linux_pt_regs*)fp;
|
||||
@ -242,7 +242,7 @@ linux_sendsig(catcher, sig, mask, code) /* XXX Check me */
|
||||
*/
|
||||
tf->fixreg[1] = fp - LINUX__SIGNAL_FRAMESIZE;
|
||||
tf->lr = (int)catcher;
|
||||
tf->fixreg[3] = (int)native_to_linux_sig[sig];
|
||||
tf->fixreg[3] = (int)native_to_linux_signo[sig];
|
||||
tf->fixreg[4] = fp;
|
||||
tf->srr0 = (int)p->p_sigctx.ps_sigcode;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: linux_sigarray.c,v 1.2 2001/11/13 02:08:46 lukem Exp $ */
|
||||
/* $NetBSD: linux_sigarray.c,v 1.3 2002/03/31 22:22:46 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1995, 1998, 2001 The NetBSD Foundation, Inc.
|
||||
@ -37,7 +37,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_sigarray.c,v 1.2 2001/11/13 02:08:46 lukem Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_sigarray.c,v 1.3 2002/03/31 22:22:46 christos Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -46,7 +46,7 @@ __KERNEL_RCSID(0, "$NetBSD: linux_sigarray.c,v 1.2 2001/11/13 02:08:46 lukem Exp
|
||||
|
||||
#include <compat/linux/common/linux_signal.h>
|
||||
|
||||
const int linux_to_native_sig[LINUX__NSIG] = {
|
||||
const int linux_to_native_signo[LINUX__NSIG] = {
|
||||
0, /* 0 */
|
||||
SIGHUP,
|
||||
SIGINT,
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: linux_misc.c,v 1.104 2002/03/22 17:14:18 christos Exp $ */
|
||||
/* $NetBSD: linux_misc.c,v 1.105 2002/03/31 22:22:47 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1995, 1998, 1999 The NetBSD Foundation, Inc.
|
||||
@ -64,7 +64,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_misc.c,v 1.104 2002/03/22 17:14:18 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_misc.c,v 1.105 2002/03/31 22:22:47 christos Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -185,11 +185,12 @@ bsd_to_linux_wstat(st)
|
||||
if (WIFSIGNALED(*st)) {
|
||||
sig = WTERMSIG(*st);
|
||||
if (sig >= 0 && sig < NSIG)
|
||||
*st= (*st& ~0177) | native_to_linux_sig[sig];
|
||||
*st= (*st& ~0177) | native_to_linux_signo[sig];
|
||||
} else if (WIFSTOPPED(*st)) {
|
||||
sig = WSTOPSIG(*st);
|
||||
if (sig >= 0 && sig < NSIG)
|
||||
*st = (*st & ~0xff00) | (native_to_linux_sig[sig] << 8);
|
||||
*st = (*st & ~0xff00) |
|
||||
(native_to_linux_signo[sig] << 8);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: linux_sched.c,v 1.9 2001/11/15 09:48:01 lukem Exp $ */
|
||||
/* $NetBSD: linux_sched.c,v 1.10 2002/03/31 22:22:47 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999 The NetBSD Foundation, Inc.
|
||||
@ -42,7 +42,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_sched.c,v 1.9 2001/11/15 09:48:01 lukem Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_sched.c,v 1.10 2002/03/31 22:22:47 christos Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/mount.h>
|
||||
@ -93,7 +93,7 @@ linux_sys_clone(p, v, retval)
|
||||
sig = SCARG(uap, flags) & LINUX_CLONE_CSIGNAL;
|
||||
if (sig < 0 || sig >= LINUX__NSIG)
|
||||
return (EINVAL);
|
||||
sig = linux_to_native_sig[sig];
|
||||
sig = linux_to_native_signo[sig];
|
||||
|
||||
/*
|
||||
* Note that Linux does not provide a portable way of specifying
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: linux_sig_notalpha.c,v 1.24 2002/02/15 16:48:03 christos Exp $ */
|
||||
/* $NetBSD: linux_sig_notalpha.c,v 1.25 2002/03/31 22:22:47 christos 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.24 2002/02/15 16:48:03 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_sig_notalpha.c,v 1.25 2002/03/31 22:22:47 christos Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -90,7 +90,7 @@ linux_sys_signal(p, v, retval)
|
||||
nbsa.sa_handler = SCARG(uap, handler);
|
||||
sigemptyset(&nbsa.sa_mask);
|
||||
nbsa.sa_flags = SA_RESETHAND | SA_NODEFER;
|
||||
error = sigaction1(p, linux_to_native_sig[sig],
|
||||
error = sigaction1(p, linux_to_native_signo[sig],
|
||||
&nbsa, &obsa);
|
||||
if (error == 0)
|
||||
*retval = (int)obsa.sa_handler;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: linux_sigaction.c,v 1.22 2002/02/15 16:48:03 christos Exp $ */
|
||||
/* $NetBSD: linux_sigaction.c,v 1.23 2002/03/31 22:22:47 christos 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.22 2002/02/15 16:48:03 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_sigaction.c,v 1.23 2002/03/31 22:22:47 christos Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -94,13 +94,13 @@ linux_sys_sigaction(p, v, retval)
|
||||
sig = SCARG(uap, signum);
|
||||
if (sig < 0 || sig >= LINUX__NSIG)
|
||||
return (EINVAL);
|
||||
if (sig > 0 && !linux_to_native_sig[sig]) {
|
||||
if (sig > 0 && !linux_to_native_signo[sig]) {
|
||||
/* Pretend that we did something useful for unknown signals. */
|
||||
obsa.sa_handler = SIG_IGN;
|
||||
sigemptyset(&obsa.sa_mask);
|
||||
obsa.sa_flags = 0;
|
||||
} else {
|
||||
error = sigaction1(p, linux_to_native_sig[sig],
|
||||
error = sigaction1(p, linux_to_native_signo[sig],
|
||||
SCARG(uap, nsa) ? &nbsa : 0, SCARG(uap, osa) ? &obsa : 0);
|
||||
if (error)
|
||||
return (error);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: linux_signal.c,v 1.36 2002/03/22 17:14:19 christos Exp $ */
|
||||
/* $NetBSD: linux_signal.c,v 1.37 2002/03/31 22:22:47 christos 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.36 2002/03/22 17:14:19 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_signal.c,v 1.37 2002/03/31 22:22:47 christos Exp $");
|
||||
|
||||
#define COMPAT_LINUX 1
|
||||
|
||||
@ -92,80 +92,8 @@ __KERNEL_RCSID(0, "$NetBSD: linux_signal.c,v 1.36 2002/03/22 17:14:19 christos E
|
||||
#define DPRINTF(a)
|
||||
#endif
|
||||
|
||||
#ifndef LINUX_SIGINFO
|
||||
#define LINUX_SIGINFO 0
|
||||
#endif
|
||||
#ifndef LINUX_SIGEMT
|
||||
#define LINUX_SIGEMT 0
|
||||
#endif
|
||||
/* Note: linux_to_native_sig[] is in <arch>/linux_sigarray.c */
|
||||
const int native_to_linux_sig[] = {
|
||||
0, /* 0 */
|
||||
LINUX_SIGHUP, /* 1 */
|
||||
LINUX_SIGINT, /* 2 */
|
||||
LINUX_SIGQUIT, /* 3 */
|
||||
LINUX_SIGILL, /* 4 */
|
||||
LINUX_SIGTRAP, /* 5 */
|
||||
LINUX_SIGABRT, /* 6 */
|
||||
LINUX_SIGEMT, /* 7 */
|
||||
LINUX_SIGFPE, /* 8 */
|
||||
LINUX_SIGKILL, /* 9 */
|
||||
LINUX_SIGBUS, /* 10 */
|
||||
LINUX_SIGSEGV, /* 11 */
|
||||
LINUX_SIGSYS, /* 12 */
|
||||
LINUX_SIGPIPE, /* 13 */
|
||||
LINUX_SIGALRM, /* 14 */
|
||||
LINUX_SIGTERM, /* 15 */
|
||||
LINUX_SIGURG, /* 16 */
|
||||
LINUX_SIGSTOP, /* 17 */
|
||||
LINUX_SIGTSTP, /* 18 */
|
||||
LINUX_SIGCONT, /* 19 */
|
||||
LINUX_SIGCHLD, /* 20 */
|
||||
LINUX_SIGTTIN, /* 21 */
|
||||
LINUX_SIGTTOU, /* 22 */
|
||||
LINUX_SIGIO, /* 23 */
|
||||
LINUX_SIGXCPU, /* 24 */
|
||||
LINUX_SIGXFSZ, /* 25 */
|
||||
LINUX_SIGVTALRM, /* 26 */
|
||||
LINUX_SIGPROF, /* 27 */
|
||||
LINUX_SIGWINCH, /* 28 */
|
||||
LINUX_SIGINFO, /* 29 */
|
||||
LINUX_SIGUSR1, /* 30 */
|
||||
LINUX_SIGUSR2, /* 31 */
|
||||
LINUX_SIGPWR, /* 32 */
|
||||
LINUX_SIGRTMIN + 0, /* 33 */
|
||||
LINUX_SIGRTMIN + 1, /* 34 */
|
||||
LINUX_SIGRTMIN + 2, /* 35 */
|
||||
LINUX_SIGRTMIN + 3, /* 36 */
|
||||
LINUX_SIGRTMIN + 4, /* 37 */
|
||||
LINUX_SIGRTMIN + 5, /* 38 */
|
||||
LINUX_SIGRTMIN + 6, /* 39 */
|
||||
LINUX_SIGRTMIN + 7, /* 40 */
|
||||
LINUX_SIGRTMIN + 8, /* 41 */
|
||||
LINUX_SIGRTMIN + 9, /* 42 */
|
||||
LINUX_SIGRTMIN + 10, /* 43 */
|
||||
LINUX_SIGRTMIN + 11, /* 44 */
|
||||
LINUX_SIGRTMIN + 12, /* 45 */
|
||||
LINUX_SIGRTMIN + 13, /* 46 */
|
||||
LINUX_SIGRTMIN + 14, /* 47 */
|
||||
LINUX_SIGRTMIN + 15, /* 48 */
|
||||
LINUX_SIGRTMIN + 16, /* 49 */
|
||||
LINUX_SIGRTMIN + 17, /* 50 */
|
||||
LINUX_SIGRTMIN + 18, /* 51 */
|
||||
LINUX_SIGRTMIN + 19, /* 52 */
|
||||
LINUX_SIGRTMIN + 20, /* 53 */
|
||||
LINUX_SIGRTMIN + 21, /* 54 */
|
||||
LINUX_SIGRTMIN + 22, /* 55 */
|
||||
LINUX_SIGRTMIN + 23, /* 56 */
|
||||
LINUX_SIGRTMIN + 24, /* 57 */
|
||||
LINUX_SIGRTMIN + 25, /* 58 */
|
||||
LINUX_SIGRTMIN + 26, /* 59 */
|
||||
LINUX_SIGRTMIN + 27, /* 60 */
|
||||
LINUX_SIGRTMIN + 28, /* 61 */
|
||||
LINUX_SIGRTMIN + 29, /* 62 */
|
||||
LINUX_SIGRTMIN + 30, /* 63 */
|
||||
|
||||
};
|
||||
extern const int native_to_linux_signo[];
|
||||
extern const int linux_to_native_signo[];
|
||||
|
||||
/*
|
||||
* Convert between Linux and BSD signal sets.
|
||||
@ -217,7 +145,7 @@ linux_to_native_sigset(bss, lss)
|
||||
sigemptyset(bss);
|
||||
for (i = 1; i < LINUX__NSIG; i++) {
|
||||
if (linux_sigismember(lss, i)) {
|
||||
newsig = linux_to_native_sig[i];
|
||||
newsig = linux_to_native_signo[i];
|
||||
if (newsig)
|
||||
sigaddset(bss, newsig);
|
||||
}
|
||||
@ -234,7 +162,7 @@ native_to_linux_sigset(lss, bss)
|
||||
linux_sigemptyset(lss);
|
||||
for (i = 1; i < NSIG; i++) {
|
||||
if (sigismember(bss, i)) {
|
||||
newsig = native_to_linux_sig[i];
|
||||
newsig = native_to_linux_signo[i];
|
||||
if (newsig)
|
||||
linux_sigaddset(lss, newsig);
|
||||
}
|
||||
@ -386,13 +314,13 @@ linux_sys_rt_sigaction(p, v, retval)
|
||||
sig = SCARG(uap, signum);
|
||||
if (sig < 0 || sig >= LINUX__NSIG)
|
||||
return (EINVAL);
|
||||
if (sig > 0 && !linux_to_native_sig[sig]) {
|
||||
if (sig > 0 && !linux_to_native_signo[sig]) {
|
||||
/* Pretend that we did something useful for unknown signals. */
|
||||
obsa.sa_handler = SIG_IGN;
|
||||
sigemptyset(&obsa.sa_mask);
|
||||
obsa.sa_flags = 0;
|
||||
} else {
|
||||
error = sigaction1(p, linux_to_native_sig[sig],
|
||||
error = sigaction1(p, linux_to_native_signo[sig],
|
||||
SCARG(uap, nsa) ? &nbsa : NULL, SCARG(uap, osa) ? &obsa : NULL);
|
||||
if (error)
|
||||
return (error);
|
||||
@ -626,7 +554,7 @@ linux_sys_kill(p, v, retval)
|
||||
sig = SCARG(uap, signum);
|
||||
if (sig < 0 || sig >= LINUX__NSIG)
|
||||
return (EINVAL);
|
||||
SCARG(&ka, signum) = linux_to_native_sig[sig];
|
||||
SCARG(&ka, signum) = linux_to_native_signo[sig];
|
||||
return sys_kill(p, &ka, retval);
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: linux_signal.h,v 1.17 2002/02/18 22:24:18 christos Exp $ */
|
||||
/* $NetBSD: linux_signal.h,v 1.18 2002/03/31 22:22:47 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
|
||||
@ -56,8 +56,8 @@
|
||||
#endif
|
||||
|
||||
#ifdef _KERNEL
|
||||
extern const int native_to_linux_sig[];
|
||||
extern const int linux_to_native_sig[];
|
||||
extern const int native_to_linux_signo[];
|
||||
extern const int linux_to_native_signo[];
|
||||
__BEGIN_DECLS
|
||||
int linux_sigprocmask1 __P((struct proc *, int, const linux_old_sigset_t *,
|
||||
linux_old_sigset_t *));
|
||||
|
121
sys/compat/linux/common/linux_signo.c
Normal file
121
sys/compat/linux/common/linux_signo.c
Normal file
@ -0,0 +1,121 @@
|
||||
/* $NetBSD: linux_signo.c,v 1.1 2002/03/31 22:22:47 christos Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The NetBSD Foundation
|
||||
* by Frank van der Linden and Eric Haszlakiewicz.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the NetBSD
|
||||
* Foundation, Inc. and its contributors.
|
||||
* 4. Neither the name of The NetBSD Foundation nor the names of its
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_signo.c,v 1.1 2002/03/31 22:22:47 christos Exp $");
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/signal.h>
|
||||
|
||||
#include <compat/linux/common/linux_types.h>
|
||||
#include <compat/linux/common/linux_signal.h>
|
||||
|
||||
#ifndef LINUX_SIGINFO
|
||||
#define LINUX_SIGINFO 0
|
||||
#endif
|
||||
|
||||
#ifndef LINUX_SIGEMT
|
||||
#define LINUX_SIGEMT 0
|
||||
#endif
|
||||
|
||||
/* Note: linux_to_native_signo[] is in <arch>/linux_sigarray.c */
|
||||
const int native_to_linux_signo[] = {
|
||||
0, /* 0 */
|
||||
LINUX_SIGHUP, /* 1 */
|
||||
LINUX_SIGINT, /* 2 */
|
||||
LINUX_SIGQUIT, /* 3 */
|
||||
LINUX_SIGILL, /* 4 */
|
||||
LINUX_SIGTRAP, /* 5 */
|
||||
LINUX_SIGABRT, /* 6 */
|
||||
LINUX_SIGEMT, /* 7 */
|
||||
LINUX_SIGFPE, /* 8 */
|
||||
LINUX_SIGKILL, /* 9 */
|
||||
LINUX_SIGBUS, /* 10 */
|
||||
LINUX_SIGSEGV, /* 11 */
|
||||
LINUX_SIGSYS, /* 12 */
|
||||
LINUX_SIGPIPE, /* 13 */
|
||||
LINUX_SIGALRM, /* 14 */
|
||||
LINUX_SIGTERM, /* 15 */
|
||||
LINUX_SIGURG, /* 16 */
|
||||
LINUX_SIGSTOP, /* 17 */
|
||||
LINUX_SIGTSTP, /* 18 */
|
||||
LINUX_SIGCONT, /* 19 */
|
||||
LINUX_SIGCHLD, /* 20 */
|
||||
LINUX_SIGTTIN, /* 21 */
|
||||
LINUX_SIGTTOU, /* 22 */
|
||||
LINUX_SIGIO, /* 23 */
|
||||
LINUX_SIGXCPU, /* 24 */
|
||||
LINUX_SIGXFSZ, /* 25 */
|
||||
LINUX_SIGVTALRM, /* 26 */
|
||||
LINUX_SIGPROF, /* 27 */
|
||||
LINUX_SIGWINCH, /* 28 */
|
||||
LINUX_SIGINFO, /* 29 */
|
||||
LINUX_SIGUSR1, /* 30 */
|
||||
LINUX_SIGUSR2, /* 31 */
|
||||
LINUX_SIGPWR, /* 32 */
|
||||
LINUX_SIGRTMIN + 0, /* 33 */
|
||||
LINUX_SIGRTMIN + 1, /* 34 */
|
||||
LINUX_SIGRTMIN + 2, /* 35 */
|
||||
LINUX_SIGRTMIN + 3, /* 36 */
|
||||
LINUX_SIGRTMIN + 4, /* 37 */
|
||||
LINUX_SIGRTMIN + 5, /* 38 */
|
||||
LINUX_SIGRTMIN + 6, /* 39 */
|
||||
LINUX_SIGRTMIN + 7, /* 40 */
|
||||
LINUX_SIGRTMIN + 8, /* 41 */
|
||||
LINUX_SIGRTMIN + 9, /* 42 */
|
||||
LINUX_SIGRTMIN + 10, /* 43 */
|
||||
LINUX_SIGRTMIN + 11, /* 44 */
|
||||
LINUX_SIGRTMIN + 12, /* 45 */
|
||||
LINUX_SIGRTMIN + 13, /* 46 */
|
||||
LINUX_SIGRTMIN + 14, /* 47 */
|
||||
LINUX_SIGRTMIN + 15, /* 48 */
|
||||
LINUX_SIGRTMIN + 16, /* 49 */
|
||||
LINUX_SIGRTMIN + 17, /* 50 */
|
||||
LINUX_SIGRTMIN + 18, /* 51 */
|
||||
LINUX_SIGRTMIN + 19, /* 52 */
|
||||
LINUX_SIGRTMIN + 20, /* 53 */
|
||||
LINUX_SIGRTMIN + 21, /* 54 */
|
||||
LINUX_SIGRTMIN + 22, /* 55 */
|
||||
LINUX_SIGRTMIN + 23, /* 56 */
|
||||
LINUX_SIGRTMIN + 24, /* 57 */
|
||||
LINUX_SIGRTMIN + 25, /* 58 */
|
||||
LINUX_SIGRTMIN + 26, /* 59 */
|
||||
LINUX_SIGRTMIN + 27, /* 60 */
|
||||
LINUX_SIGRTMIN + 28, /* 61 */
|
||||
LINUX_SIGRTMIN + 29, /* 62 */
|
||||
LINUX_SIGRTMIN + 30, /* 63 */
|
||||
};
|
@ -1,4 +1,4 @@
|
||||
# $NetBSD: files.linux,v 1.15 2002/02/15 16:47:58 christos Exp $
|
||||
# $NetBSD: files.linux,v 1.16 2002/03/31 22:22:44 christos Exp $
|
||||
#
|
||||
# Config file description for machine-independent Linux compat code.
|
||||
# Included by ports that need it.
|
||||
@ -21,6 +21,7 @@ file compat/linux/common/linux_ipc.c compat_linux
|
||||
file compat/linux/common/linux_misc.c compat_linux
|
||||
file compat/linux/common/linux_sched.c compat_linux
|
||||
file compat/linux/common/linux_signal.c compat_linux
|
||||
file compat/linux/common/linux_signo.c compat_linux
|
||||
file compat/linux/common/linux_socket.c compat_linux
|
||||
file compat/linux/common/linux_sysctl.c compat_linux
|
||||
file compat/linux/common/linux_termios.c compat_linux
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $NetBSD: files.osf1,v 1.17 2000/12/08 21:39:31 jdolecek Exp $
|
||||
# $NetBSD: files.osf1,v 1.18 2002/03/31 22:22:48 christos Exp $
|
||||
#
|
||||
# Config file description for machine-independent OSF/1 compat code.
|
||||
# Included by ports that need it.
|
||||
@ -14,8 +14,8 @@ file compat/osf1/osf1_sysent.c compat_osf1
|
||||
|
||||
# OSF/1 <-> NetBSD structure, flag, and value conversion files
|
||||
file compat/osf1/osf1_cvt.c compat_osf1
|
||||
file compat/osf1/osf1_cvt_errno.c compat_osf1
|
||||
file compat/osf1/osf1_cvt_signal.c compat_osf1
|
||||
file compat/osf1/osf1_errno.c compat_osf1
|
||||
file compat/osf1/osf1_signo.c compat_osf1
|
||||
|
||||
# functionality emulation files
|
||||
file compat/osf1/osf1_descrip.c compat_osf1
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: osf1_cvt.c,v 1.12 2001/11/13 02:09:11 lukem Exp $ */
|
||||
/* $NetBSD: osf1_cvt.c,v 1.13 2002/03/31 22:22:48 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1999 Christopher G. Demetriou. All rights reserved.
|
||||
@ -58,7 +58,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: osf1_cvt.c,v 1.12 2001/11/13 02:09:11 lukem Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: osf1_cvt.c,v 1.13 2002/03/31 22:22:48 christos Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -595,7 +595,7 @@ osf1_cvt_sigset_from_native(bss, oss)
|
||||
osf1_sigemptyset(oss);
|
||||
for (i = 1; i < NSIG; i++) {
|
||||
if (sigismember(bss, i)) {
|
||||
newsig = osf1_signal_rxlist[i];
|
||||
newsig = native_to_osf1_signo[i];
|
||||
if (newsig)
|
||||
osf1_sigaddset(oss, newsig);
|
||||
}
|
||||
@ -612,7 +612,7 @@ osf1_cvt_sigset_to_native(oss, bss)
|
||||
sigemptyset(bss);
|
||||
for (i = 1; i < OSF1_NSIG; i++) {
|
||||
if (osf1_sigismember(oss, i)) {
|
||||
newsig = osf1_signal_xlist[i];
|
||||
newsig = osf1_to_native_signo[i];
|
||||
if (newsig)
|
||||
sigaddset(bss, newsig);
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: osf1_cvt.h,v 1.7 2001/04/04 19:52:18 ross Exp $ */
|
||||
/* $NetBSD: osf1_cvt.h,v 1.8 2002/03/31 22:22:48 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1999 Christopher G. Demetriou. All rights reserved.
|
||||
@ -52,6 +52,7 @@ void osf1_cvt_flock_from_native(const struct flock *nf,
|
||||
struct osf1_flock *of);
|
||||
int osf1_cvt_flock_to_native(const struct osf1_flock *of,
|
||||
struct flock *nf);
|
||||
struct msghdr;
|
||||
int osf1_cvt_msghdr_xopen_to_native(const struct osf1_msghdr_xopen *omh,
|
||||
struct msghdr *nmh);
|
||||
int osf1_cvt_pathconf_name_to_native(int oname, int *bnamep);
|
||||
@ -74,9 +75,9 @@ void osf1_cvt_stat2_from_native(const struct stat *nst,
|
||||
void osf1_cvt_statfs_from_native(const struct statfs *nsfs,
|
||||
struct osf1_statfs *osfs);
|
||||
|
||||
extern const int osf1_errno_rxlist[];
|
||||
extern const int osf1_signal_xlist[];
|
||||
extern const int osf1_signal_rxlist[];
|
||||
extern const int native_to_osf1_errno[];
|
||||
extern const int osf1_to_native_signo[];
|
||||
extern const int native_to_osf1_signo[];
|
||||
|
||||
extern const struct emul_flags_xtab osf1_access_flags_xtab[];
|
||||
extern const struct emul_flags_xtab osf1_fcntl_getsetfd_flags_rxtab[];
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: osf1_cvt_errno.c,v 1.6 2001/11/13 02:09:11 lukem Exp $ */
|
||||
/* $NetBSD: osf1_errno.c,v 1.5 2002/03/31 22:22:48 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1999 Christopher G. Demetriou. All rights reserved.
|
||||
@ -31,7 +31,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: osf1_cvt_errno.c,v 1.6 2001/11/13 02:09:11 lukem Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: osf1_errno.c,v 1.5 2002/03/31 22:22:48 christos Exp $");
|
||||
|
||||
#include <compat/osf1/osf1.h>
|
||||
#include <compat/osf1/osf1_cvt.h>
|
||||
@ -43,7 +43,7 @@ __KERNEL_RCSID(0, "$NetBSD: osf1_cvt_errno.c,v 1.6 2001/11/13 02:09:11 lukem Exp
|
||||
* It is up to date as of Digital UNIX V4.0 and NetBSD 1.4.
|
||||
*/
|
||||
|
||||
const int osf1_errno_rxlist[] = {
|
||||
const int native_to_osf1_errno[] = {
|
||||
0,
|
||||
OSF1_EPERM, /* EPERM (1) -> 1 */
|
||||
OSF1_ENOENT, /* ENOENT (2) -> 2 */
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: osf1_exec.c,v 1.28 2001/11/13 02:09:12 lukem Exp $ */
|
||||
/* $NetBSD: osf1_exec.c,v 1.29 2002/03/31 22:22:48 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1999 Christopher G. Demetriou. All rights reserved.
|
||||
@ -31,7 +31,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: osf1_exec.c,v 1.28 2001/11/13 02:09:12 lukem Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: osf1_exec.c,v 1.29 2002/03/31 22:22:48 christos Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -57,7 +57,7 @@ const struct emul emul_osf1 = {
|
||||
"/emul/osf1",
|
||||
#ifndef __HAVE_MINIMAL_EMUL
|
||||
0,
|
||||
(int *)osf1_errno_rxlist,
|
||||
(int *)native_to_osf1_errno,
|
||||
OSF1_SYS_syscall,
|
||||
OSF1_SYS_MAXSYSCALL,
|
||||
#endif
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: osf1_cvt_signal.c,v 1.2 2001/11/13 02:09:11 lukem Exp $ */
|
||||
/* $NetBSD: osf1_signo.c,v 1.1 2002/03/31 22:22:48 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1999 Christopher G. Demetriou. All rights reserved.
|
||||
@ -31,7 +31,10 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: osf1_cvt_signal.c,v 1.2 2001/11/13 02:09:11 lukem Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: osf1_signo.c,v 1.1 2002/03/31 22:22:48 christos Exp $");
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/signal.h>
|
||||
|
||||
#include <compat/osf1/osf1.h>
|
||||
#include <compat/osf1/osf1_cvt.h>
|
||||
@ -43,7 +46,7 @@ __KERNEL_RCSID(0, "$NetBSD: osf1_cvt_signal.c,v 1.2 2001/11/13 02:09:11 lukem Ex
|
||||
* XXX IT IS NOT UP TO DATE.
|
||||
*/
|
||||
|
||||
const int osf1_signal_rxlist[] = {
|
||||
const int native_to_osf1_signo[] = {
|
||||
0,
|
||||
OSF1_SIGHUP,
|
||||
OSF1_SIGINT,
|
||||
@ -78,7 +81,7 @@ const int osf1_signal_rxlist[] = {
|
||||
OSF1_SIGUSR2,
|
||||
};
|
||||
|
||||
const int osf1_signal_xlist[] = {
|
||||
const int osf1_to_native_signo[] = {
|
||||
0,
|
||||
SIGHUP,
|
||||
SIGINT,
|
@ -1,4 +1,4 @@
|
||||
# $NetBSD: files.svr4,v 1.14 2001/02/21 23:53:01 eeh Exp $
|
||||
# $NetBSD: files.svr4,v 1.15 2002/03/31 22:22:49 christos Exp $
|
||||
#
|
||||
# Config file description for machine-independent SVR4 compat code.
|
||||
# Included by ports that need it.
|
||||
@ -19,6 +19,7 @@ file compat/svr4/svr4_misc.c compat_svr4
|
||||
file compat/svr4/svr4_net.c compat_svr4
|
||||
file compat/svr4/svr4_resource.c compat_svr4
|
||||
file compat/svr4/svr4_signal.c compat_svr4
|
||||
file compat/svr4/svr4_signo.c compat_svr4
|
||||
file compat/svr4/svr4_socket.c compat_svr4
|
||||
file compat/svr4/svr4_sockio.c compat_svr4
|
||||
file compat/svr4/svr4_stat.c compat_svr4
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: svr4_misc.c,v 1.96 2002/03/16 20:43:57 christos Exp $ */
|
||||
/* $NetBSD: svr4_misc.c,v 1.97 2002/03/31 22:22:49 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1994 The NetBSD Foundation, Inc.
|
||||
@ -44,7 +44,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: svr4_misc.c,v 1.96 2002/03/16 20:43:57 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: svr4_misc.c,v 1.97 2002/03/31 22:22:49 christos Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -152,11 +152,11 @@ svr4_sys_wait(p, v, retval)
|
||||
if (WIFSIGNALED(st)) {
|
||||
sig = WTERMSIG(st);
|
||||
if (sig >= 0 && sig < NSIG)
|
||||
st = (st & ~0177) | native_to_svr4_sig[sig];
|
||||
st = (st & ~0177) | native_to_svr4_signo[sig];
|
||||
} else if (WIFSTOPPED(st)) {
|
||||
sig = WSTOPSIG(st);
|
||||
if (sig >= 0 && sig < NSIG)
|
||||
st = (st & ~0xff00) | (native_to_svr4_sig[sig] << 8);
|
||||
st = (st & ~0xff00) | (native_to_svr4_signo[sig] << 8);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1151,7 +1151,7 @@ svr4_setinfo(p, st, s)
|
||||
} else if (WIFSTOPPED(st)) {
|
||||
sig = WSTOPSIG(st);
|
||||
if (sig >= 0 && sig < NSIG)
|
||||
i.si_status = native_to_svr4_sig[sig];
|
||||
i.si_status = native_to_svr4_signo[sig];
|
||||
|
||||
if (i.si_status == SVR4_SIGCONT)
|
||||
i.si_code = SVR4_CLD_CONTINUED;
|
||||
@ -1160,7 +1160,7 @@ svr4_setinfo(p, st, s)
|
||||
} else {
|
||||
sig = WTERMSIG(st);
|
||||
if (sig >= 0 && sig < NSIG)
|
||||
i.si_status = native_to_svr4_sig[sig];
|
||||
i.si_status = native_to_svr4_signo[sig];
|
||||
|
||||
if (WCOREDUMP(st))
|
||||
i.si_code = SVR4_CLD_DUMPED;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: svr4_signal.c,v 1.43 2002/03/20 17:50:07 christos Exp $ */
|
||||
/* $NetBSD: svr4_signal.c,v 1.44 2002/03/31 22:22:49 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1994, 1998 The NetBSD Foundation, Inc.
|
||||
@ -37,7 +37,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: svr4_signal.c,v 1.43 2002/03/20 17:50:07 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: svr4_signal.c,v 1.44 2002/03/31 22:22:49 christos Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -74,139 +74,8 @@ void svr4_to_native_sigaction __P((const struct svr4_sigaction *,
|
||||
void native_to_svr4_sigaction __P((const struct sigaction *,
|
||||
struct svr4_sigaction *));
|
||||
|
||||
const int native_to_svr4_sig[NSIG] = {
|
||||
0, /* 0 */
|
||||
SVR4_SIGHUP, /* 1 */
|
||||
SVR4_SIGINT, /* 2 */
|
||||
SVR4_SIGQUIT, /* 3 */
|
||||
SVR4_SIGILL, /* 4 */
|
||||
SVR4_SIGTRAP, /* 5 */
|
||||
SVR4_SIGABRT, /* 6 */
|
||||
SVR4_SIGEMT, /* 7 */
|
||||
SVR4_SIGFPE, /* 8 */
|
||||
SVR4_SIGKILL, /* 9 */
|
||||
SVR4_SIGBUS, /* 10 */
|
||||
SVR4_SIGSEGV, /* 11 */
|
||||
SVR4_SIGSYS, /* 12 */
|
||||
SVR4_SIGPIPE, /* 13 */
|
||||
SVR4_SIGALRM, /* 14 */
|
||||
SVR4_SIGTERM, /* 15 */
|
||||
SVR4_SIGURG, /* 16 */
|
||||
SVR4_SIGSTOP, /* 17 */
|
||||
SVR4_SIGTSTP, /* 18 */
|
||||
SVR4_SIGCONT, /* 19 */
|
||||
SVR4_SIGCHLD, /* 20 */
|
||||
SVR4_SIGTTIN, /* 21 */
|
||||
SVR4_SIGTTOU, /* 22 */
|
||||
SVR4_SIGIO, /* 23 */
|
||||
SVR4_SIGXCPU, /* 24 */
|
||||
SVR4_SIGXFSZ, /* 25 */
|
||||
SVR4_SIGVTALRM, /* 26 */
|
||||
SVR4_SIGPROF, /* 27 */
|
||||
SVR4_SIGWINCH, /* 28 */
|
||||
0, /* 29 SIGINFO */
|
||||
SVR4_SIGUSR1, /* 30 */
|
||||
SVR4_SIGUSR2, /* 31 */
|
||||
SVR4_SIGPWR, /* 32 */
|
||||
SVR4_SIGRTMIN + 0, /* 33 */
|
||||
SVR4_SIGRTMIN + 1, /* 34 */
|
||||
SVR4_SIGRTMIN + 2, /* 35 */
|
||||
SVR4_SIGRTMIN + 3, /* 36 */
|
||||
SVR4_SIGRTMIN + 4, /* 37 */
|
||||
SVR4_SIGRTMIN + 5, /* 38 */
|
||||
SVR4_SIGRTMIN + 6, /* 39 */
|
||||
SVR4_SIGRTMIN + 7, /* 40 */
|
||||
SVR4_SIGRTMIN + 8, /* 41 */
|
||||
SVR4_SIGRTMIN + 9, /* 42 */
|
||||
SVR4_SIGRTMIN + 10, /* 43 */
|
||||
SVR4_SIGRTMIN + 11, /* 44 */
|
||||
SVR4_SIGRTMIN + 12, /* 45 */
|
||||
SVR4_SIGRTMIN + 13, /* 46 */
|
||||
SVR4_SIGRTMIN + 14, /* 47 */
|
||||
SVR4_SIGRTMIN + 15, /* 48 */
|
||||
SVR4_SIGRTMIN + 16, /* 49 */
|
||||
SVR4_SIGRTMIN + 17, /* 50 */
|
||||
SVR4_SIGRTMIN + 18, /* 51 */
|
||||
SVR4_SIGRTMIN + 19, /* 52 */
|
||||
SVR4_SIGRTMIN + 20, /* 53 */
|
||||
SVR4_SIGRTMIN + 21, /* 54 */
|
||||
SVR4_SIGRTMIN + 22, /* 55 */
|
||||
SVR4_SIGRTMIN + 23, /* 56 */
|
||||
SVR4_SIGRTMIN + 24, /* 57 */
|
||||
SVR4_SIGRTMIN + 25, /* 58 */
|
||||
SVR4_SIGRTMIN + 26, /* 59 */
|
||||
SVR4_SIGRTMIN + 27, /* 60 */
|
||||
SVR4_SIGRTMIN + 28, /* 61 */
|
||||
SVR4_SIGRTMIN + 29, /* 62 */
|
||||
SVR4_SIGRTMIN + 30, /* 63 */
|
||||
};
|
||||
|
||||
const int svr4_to_native_sig[SVR4_NSIG] = {
|
||||
0, /* 0 */
|
||||
SIGHUP, /* 1 */
|
||||
SIGINT, /* 2 */
|
||||
SIGQUIT, /* 3 */
|
||||
SIGILL, /* 4 */
|
||||
SIGTRAP, /* 5 */
|
||||
SIGABRT, /* 6 */
|
||||
SIGEMT, /* 7 */
|
||||
SIGFPE, /* 8 */
|
||||
SIGKILL, /* 9 */
|
||||
SIGBUS, /* 10 */
|
||||
SIGSEGV, /* 11 */
|
||||
SIGSYS, /* 12 */
|
||||
SIGPIPE, /* 13 */
|
||||
SIGALRM, /* 14 */
|
||||
SIGTERM, /* 15 */
|
||||
SIGUSR1, /* 16 */
|
||||
SIGUSR2, /* 17 */
|
||||
SIGCHLD, /* 18 */
|
||||
SIGPWR, /* 19 */
|
||||
SIGWINCH, /* 20 */
|
||||
SIGURG, /* 21 */
|
||||
SIGIO, /* 22 */
|
||||
SIGSTOP, /* 23 */
|
||||
SIGTSTP, /* 24 */
|
||||
SIGCONT, /* 25 */
|
||||
SIGTTIN, /* 26 */
|
||||
SIGTTOU, /* 27 */
|
||||
SIGVTALRM, /* 28 */
|
||||
SIGPROF, /* 29 */
|
||||
SIGXCPU, /* 30 */
|
||||
SIGXFSZ, /* 31 */
|
||||
SIGRTMIN + 0, /* 32 */
|
||||
SIGRTMIN + 1, /* 33 */
|
||||
SIGRTMIN + 2, /* 34 */
|
||||
SIGRTMIN + 3, /* 35 */
|
||||
SIGRTMIN + 4, /* 36 */
|
||||
SIGRTMIN + 5, /* 37 */
|
||||
SIGRTMIN + 6, /* 38 */
|
||||
SIGRTMIN + 7, /* 39 */
|
||||
SIGRTMIN + 8, /* 40 */
|
||||
SIGRTMIN + 9, /* 41 */
|
||||
SIGRTMIN + 10, /* 42 */
|
||||
SIGRTMIN + 11, /* 43 */
|
||||
SIGRTMIN + 12, /* 44 */
|
||||
SIGRTMIN + 13, /* 45 */
|
||||
SIGRTMIN + 14, /* 46 */
|
||||
SIGRTMIN + 15, /* 47 */
|
||||
SIGRTMIN + 16, /* 48 */
|
||||
SIGRTMIN + 17, /* 49 */
|
||||
SIGRTMIN + 18, /* 50 */
|
||||
SIGRTMIN + 19, /* 51 */
|
||||
SIGRTMIN + 20, /* 52 */
|
||||
SIGRTMIN + 21, /* 53 */
|
||||
SIGRTMIN + 22, /* 54 */
|
||||
SIGRTMIN + 23, /* 55 */
|
||||
SIGRTMIN + 24, /* 56 */
|
||||
SIGRTMIN + 25, /* 57 */
|
||||
SIGRTMIN + 26, /* 58 */
|
||||
SIGRTMIN + 27, /* 59 */
|
||||
SIGRTMIN + 28, /* 60 */
|
||||
SIGRTMIN + 29, /* 61 */
|
||||
SIGRTMIN + 30, /* 62 */
|
||||
0, /* 63 */
|
||||
};
|
||||
extern const int native_to_svr4_signo[];
|
||||
extern const int svr4_to_native_signo[];
|
||||
|
||||
static __inline void
|
||||
svr4_sigfillset(s)
|
||||
@ -216,7 +85,7 @@ svr4_sigfillset(s)
|
||||
|
||||
svr4_sigemptyset(s);
|
||||
for (i = 1; i < SVR4_NSIG; i++)
|
||||
if (svr4_to_native_sig[i] != 0)
|
||||
if (svr4_to_native_signo[i] != 0)
|
||||
svr4_sigaddset(s, i);
|
||||
}
|
||||
|
||||
@ -230,7 +99,7 @@ svr4_to_native_sigset(sss, bss)
|
||||
sigemptyset(bss);
|
||||
for (i = 1; i < SVR4_NSIG; i++) {
|
||||
if (svr4_sigismember(sss, i)) {
|
||||
newsig = svr4_to_native_sig[i];
|
||||
newsig = svr4_to_native_signo[i];
|
||||
if (newsig)
|
||||
sigaddset(bss, newsig);
|
||||
}
|
||||
@ -248,7 +117,7 @@ native_to_svr4_sigset(bss, sss)
|
||||
svr4_sigemptyset(sss);
|
||||
for (i = 1; i < NSIG; i++) {
|
||||
if (sigismember(bss, i)) {
|
||||
newsig = native_to_svr4_sig[i];
|
||||
newsig = native_to_svr4_signo[i];
|
||||
if (newsig)
|
||||
svr4_sigaddset(sss, newsig);
|
||||
}
|
||||
@ -361,7 +230,7 @@ svr4_sys_sigaction(p, v, retval)
|
||||
return (error);
|
||||
svr4_to_native_sigaction(&nssa, &nbsa);
|
||||
}
|
||||
error = sigaction1(p, svr4_to_native_sig[SCARG(uap, signum)],
|
||||
error = sigaction1(p, svr4_to_native_signo[SCARG(uap, signum)],
|
||||
SCARG(uap, nsa) ? &nbsa : 0, SCARG(uap, osa) ? &obsa : 0);
|
||||
if (error)
|
||||
return (error);
|
||||
@ -420,7 +289,7 @@ svr4_sys_signal(p, v, retval)
|
||||
syscallarg(int) signum;
|
||||
syscallarg(svr4_sig_t) handler;
|
||||
} */ *uap = v;
|
||||
int signum = svr4_to_native_sig[SVR4_SIGNO(SCARG(uap, signum))];
|
||||
int signum = svr4_to_native_signo[SVR4_SIGNO(SCARG(uap, signum))];
|
||||
struct sigaction nbsa, obsa;
|
||||
sigset_t ss;
|
||||
int error;
|
||||
@ -603,7 +472,7 @@ svr4_sys_kill(p, v, retval)
|
||||
struct sys_kill_args ka;
|
||||
|
||||
SCARG(&ka, pid) = SCARG(uap, pid);
|
||||
SCARG(&ka, signum) = svr4_to_native_sig[SCARG(uap, signum)];
|
||||
SCARG(&ka, signum) = svr4_to_native_signo[SCARG(uap, signum)];
|
||||
return sys_kill(p, &ka, retval);
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: svr4_signal.h,v 1.20 2002/03/20 17:50:07 christos Exp $ */
|
||||
/* $NetBSD: svr4_signal.h,v 1.21 2002/03/31 22:22:49 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1994 The NetBSD Foundation, Inc.
|
||||
@ -133,8 +133,8 @@ struct svr4_sigaltstack {
|
||||
#define SVR4_SS_DISABLE 0x00000002
|
||||
#define SVR4_SS_ALLBITS 0x00000003
|
||||
|
||||
extern const int native_to_svr4_sig[];
|
||||
extern const int svr4_to_native_sig[];
|
||||
extern const int native_to_svr4_signo[];
|
||||
extern const int svr4_to_native_signo[];
|
||||
void native_to_svr4_sigset __P((const sigset_t *, svr4_sigset_t *));
|
||||
void svr4_to_native_sigset __P((const svr4_sigset_t *, sigset_t *));
|
||||
void native_to_svr4_sigaltstack __P((const struct sigaltstack *, struct svr4_sigaltstack *));
|
||||
|
180
sys/compat/svr4/svr4_signo.c
Normal file
180
sys/compat/svr4/svr4_signo.c
Normal file
@ -0,0 +1,180 @@
|
||||
/* $NetBSD: svr4_signo.c,v 1.1 2002/03/31 22:22:49 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2002. The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The NetBSD Foundation
|
||||
* by Christos Zoulas.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the NetBSD
|
||||
* Foundation, Inc. and its contributors.
|
||||
* 4. Neither the name of The NetBSD Foundation nor the names of its
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: svr4_signo.c,v 1.1 2002/03/31 22:22:49 christos Exp $");
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/signal.h>
|
||||
|
||||
#include <compat/svr4/svr4_types.h>
|
||||
#include <compat/svr4/svr4_signal.h>
|
||||
|
||||
const int native_to_svr4_signo[NSIG] = {
|
||||
0, /* 0 */
|
||||
SVR4_SIGHUP, /* 1 */
|
||||
SVR4_SIGINT, /* 2 */
|
||||
SVR4_SIGQUIT, /* 3 */
|
||||
SVR4_SIGILL, /* 4 */
|
||||
SVR4_SIGTRAP, /* 5 */
|
||||
SVR4_SIGABRT, /* 6 */
|
||||
SVR4_SIGEMT, /* 7 */
|
||||
SVR4_SIGFPE, /* 8 */
|
||||
SVR4_SIGKILL, /* 9 */
|
||||
SVR4_SIGBUS, /* 10 */
|
||||
SVR4_SIGSEGV, /* 11 */
|
||||
SVR4_SIGSYS, /* 12 */
|
||||
SVR4_SIGPIPE, /* 13 */
|
||||
SVR4_SIGALRM, /* 14 */
|
||||
SVR4_SIGTERM, /* 15 */
|
||||
SVR4_SIGURG, /* 16 */
|
||||
SVR4_SIGSTOP, /* 17 */
|
||||
SVR4_SIGTSTP, /* 18 */
|
||||
SVR4_SIGCONT, /* 19 */
|
||||
SVR4_SIGCHLD, /* 20 */
|
||||
SVR4_SIGTTIN, /* 21 */
|
||||
SVR4_SIGTTOU, /* 22 */
|
||||
SVR4_SIGIO, /* 23 */
|
||||
SVR4_SIGXCPU, /* 24 */
|
||||
SVR4_SIGXFSZ, /* 25 */
|
||||
SVR4_SIGVTALRM, /* 26 */
|
||||
SVR4_SIGPROF, /* 27 */
|
||||
SVR4_SIGWINCH, /* 28 */
|
||||
0, /* 29 SIGINFO */
|
||||
SVR4_SIGUSR1, /* 30 */
|
||||
SVR4_SIGUSR2, /* 31 */
|
||||
SVR4_SIGPWR, /* 32 */
|
||||
SVR4_SIGRTMIN + 0, /* 33 */
|
||||
SVR4_SIGRTMIN + 1, /* 34 */
|
||||
SVR4_SIGRTMIN + 2, /* 35 */
|
||||
SVR4_SIGRTMIN + 3, /* 36 */
|
||||
SVR4_SIGRTMIN + 4, /* 37 */
|
||||
SVR4_SIGRTMIN + 5, /* 38 */
|
||||
SVR4_SIGRTMIN + 6, /* 39 */
|
||||
SVR4_SIGRTMIN + 7, /* 40 */
|
||||
SVR4_SIGRTMIN + 8, /* 41 */
|
||||
SVR4_SIGRTMIN + 9, /* 42 */
|
||||
SVR4_SIGRTMIN + 10, /* 43 */
|
||||
SVR4_SIGRTMIN + 11, /* 44 */
|
||||
SVR4_SIGRTMIN + 12, /* 45 */
|
||||
SVR4_SIGRTMIN + 13, /* 46 */
|
||||
SVR4_SIGRTMIN + 14, /* 47 */
|
||||
SVR4_SIGRTMIN + 15, /* 48 */
|
||||
SVR4_SIGRTMIN + 16, /* 49 */
|
||||
SVR4_SIGRTMIN + 17, /* 50 */
|
||||
SVR4_SIGRTMIN + 18, /* 51 */
|
||||
SVR4_SIGRTMIN + 19, /* 52 */
|
||||
SVR4_SIGRTMIN + 20, /* 53 */
|
||||
SVR4_SIGRTMIN + 21, /* 54 */
|
||||
SVR4_SIGRTMIN + 22, /* 55 */
|
||||
SVR4_SIGRTMIN + 23, /* 56 */
|
||||
SVR4_SIGRTMIN + 24, /* 57 */
|
||||
SVR4_SIGRTMIN + 25, /* 58 */
|
||||
SVR4_SIGRTMIN + 26, /* 59 */
|
||||
SVR4_SIGRTMIN + 27, /* 60 */
|
||||
SVR4_SIGRTMIN + 28, /* 61 */
|
||||
SVR4_SIGRTMIN + 29, /* 62 */
|
||||
SVR4_SIGRTMIN + 30, /* 63 */
|
||||
};
|
||||
|
||||
const int svr4_to_native_signo[SVR4_NSIG] = {
|
||||
0, /* 0 */
|
||||
SIGHUP, /* 1 */
|
||||
SIGINT, /* 2 */
|
||||
SIGQUIT, /* 3 */
|
||||
SIGILL, /* 4 */
|
||||
SIGTRAP, /* 5 */
|
||||
SIGABRT, /* 6 */
|
||||
SIGEMT, /* 7 */
|
||||
SIGFPE, /* 8 */
|
||||
SIGKILL, /* 9 */
|
||||
SIGBUS, /* 10 */
|
||||
SIGSEGV, /* 11 */
|
||||
SIGSYS, /* 12 */
|
||||
SIGPIPE, /* 13 */
|
||||
SIGALRM, /* 14 */
|
||||
SIGTERM, /* 15 */
|
||||
SIGUSR1, /* 16 */
|
||||
SIGUSR2, /* 17 */
|
||||
SIGCHLD, /* 18 */
|
||||
SIGPWR, /* 19 */
|
||||
SIGWINCH, /* 20 */
|
||||
SIGURG, /* 21 */
|
||||
SIGIO, /* 22 */
|
||||
SIGSTOP, /* 23 */
|
||||
SIGTSTP, /* 24 */
|
||||
SIGCONT, /* 25 */
|
||||
SIGTTIN, /* 26 */
|
||||
SIGTTOU, /* 27 */
|
||||
SIGVTALRM, /* 28 */
|
||||
SIGPROF, /* 29 */
|
||||
SIGXCPU, /* 30 */
|
||||
SIGXFSZ, /* 31 */
|
||||
SIGRTMIN + 0, /* 32 */
|
||||
SIGRTMIN + 1, /* 33 */
|
||||
SIGRTMIN + 2, /* 34 */
|
||||
SIGRTMIN + 3, /* 35 */
|
||||
SIGRTMIN + 4, /* 36 */
|
||||
SIGRTMIN + 5, /* 37 */
|
||||
SIGRTMIN + 6, /* 38 */
|
||||
SIGRTMIN + 7, /* 39 */
|
||||
SIGRTMIN + 8, /* 40 */
|
||||
SIGRTMIN + 9, /* 41 */
|
||||
SIGRTMIN + 10, /* 42 */
|
||||
SIGRTMIN + 11, /* 43 */
|
||||
SIGRTMIN + 12, /* 44 */
|
||||
SIGRTMIN + 13, /* 45 */
|
||||
SIGRTMIN + 14, /* 46 */
|
||||
SIGRTMIN + 15, /* 47 */
|
||||
SIGRTMIN + 16, /* 48 */
|
||||
SIGRTMIN + 17, /* 49 */
|
||||
SIGRTMIN + 18, /* 50 */
|
||||
SIGRTMIN + 19, /* 51 */
|
||||
SIGRTMIN + 20, /* 52 */
|
||||
SIGRTMIN + 21, /* 53 */
|
||||
SIGRTMIN + 22, /* 54 */
|
||||
SIGRTMIN + 23, /* 55 */
|
||||
SIGRTMIN + 24, /* 56 */
|
||||
SIGRTMIN + 25, /* 57 */
|
||||
SIGRTMIN + 26, /* 58 */
|
||||
SIGRTMIN + 27, /* 59 */
|
||||
SIGRTMIN + 28, /* 60 */
|
||||
SIGRTMIN + 29, /* 61 */
|
||||
SIGRTMIN + 30, /* 62 */
|
||||
0, /* 63 */
|
||||
};
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: svr4_32_misc.c,v 1.11 2002/03/16 20:43:57 christos Exp $ */
|
||||
/* $NetBSD: svr4_32_misc.c,v 1.12 2002/03/31 22:22:49 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1994 The NetBSD Foundation, Inc.
|
||||
@ -44,7 +44,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: svr4_32_misc.c,v 1.11 2002/03/16 20:43:57 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: svr4_32_misc.c,v 1.12 2002/03/31 22:22:49 christos Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -152,11 +152,11 @@ svr4_32_sys_wait(p, v, retval)
|
||||
if (WIFSIGNALED(st)) {
|
||||
sig = WTERMSIG(st);
|
||||
if (sig >= 0 && sig < NSIG)
|
||||
st = (st & ~0177) | native_to_svr4_sig[sig];
|
||||
st = (st & ~0177) | native_to_svr4_signo[sig];
|
||||
} else if (WIFSTOPPED(st)) {
|
||||
sig = WSTOPSIG(st);
|
||||
if (sig >= 0 && sig < NSIG)
|
||||
st = (st & ~0xff00) | (native_to_svr4_sig[sig] << 8);
|
||||
st = (st & ~0xff00) | (native_to_svr4_signo[sig] << 8);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1172,7 +1172,7 @@ svr4_32_setinfo(p, st, si)
|
||||
} else if (WIFSTOPPED(st)) {
|
||||
sig = WSTOPSIG(st);
|
||||
if (sig >= 0 && sig < NSIG)
|
||||
i.si_status = native_to_svr4_sig[sig];
|
||||
i.si_status = native_to_svr4_signo[sig];
|
||||
|
||||
if (i.si_status == SVR4_SIGCONT)
|
||||
i.si_code = SVR4_CLD_CONTINUED;
|
||||
@ -1181,7 +1181,7 @@ svr4_32_setinfo(p, st, si)
|
||||
} else {
|
||||
sig = WTERMSIG(st);
|
||||
if (sig >= 0 && sig < NSIG)
|
||||
i.si_status = native_to_svr4_sig[sig];
|
||||
i.si_status = native_to_svr4_signo[sig];
|
||||
|
||||
if (WCOREDUMP(st))
|
||||
i.si_code = SVR4_CLD_DUMPED;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: svr4_32_signal.c,v 1.5 2002/03/20 17:50:08 christos Exp $ */
|
||||
/* $NetBSD: svr4_32_signal.c,v 1.6 2002/03/31 22:22:50 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1994, 1998 The NetBSD Foundation, Inc.
|
||||
@ -37,7 +37,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: svr4_32_signal.c,v 1.5 2002/03/20 17:50:08 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: svr4_32_signal.c,v 1.6 2002/03/31 22:22:50 christos Exp $");
|
||||
|
||||
#if defined(_KERNEL_OPT)
|
||||
#include "opt_compat_svr4.h"
|
||||
@ -79,7 +79,7 @@ void native_to_svr4_32_sigaction __P((const struct sigaction *,
|
||||
struct svr4_32_sigaction *));
|
||||
|
||||
#ifndef COMPAT_SVR4
|
||||
const int native_to_svr4_sig[NSIG] = {
|
||||
const int native_to_svr4_signo[NSIG] = {
|
||||
0, /* 0 */
|
||||
SVR4_SIGHUP, /* 1 */
|
||||
SVR4_SIGINT, /* 2 */
|
||||
@ -146,7 +146,7 @@ const int native_to_svr4_sig[NSIG] = {
|
||||
SVR4_SIGRTMIN + 30, /* 63 */
|
||||
};
|
||||
|
||||
const int svr4_to_native_sig[SVR4_NSIG] = {
|
||||
const int svr4_to_native_signo[SVR4_NSIG] = {
|
||||
0, /* 0 */
|
||||
SIGHUP, /* 1 */
|
||||
SIGINT, /* 2 */
|
||||
@ -222,7 +222,7 @@ svr4_32_sigfillset(s)
|
||||
|
||||
svr4_sigemptyset(s);
|
||||
for (i = 1; i < SVR4_NSIG; i++)
|
||||
if (svr4_to_native_sig[i] != 0)
|
||||
if (svr4_to_native_signo[i] != 0)
|
||||
svr4_sigaddset(s, i);
|
||||
}
|
||||
|
||||
@ -236,7 +236,7 @@ svr4_32_to_native_sigset(sss, bss)
|
||||
sigemptyset(bss);
|
||||
for (i = 1; i < SVR4_NSIG; i++) {
|
||||
if (svr4_sigismember(sss, i)) {
|
||||
newsig = svr4_to_native_sig[i];
|
||||
newsig = svr4_to_native_signo[i];
|
||||
if (newsig)
|
||||
sigaddset(bss, newsig);
|
||||
}
|
||||
@ -254,7 +254,7 @@ native_to_svr4_32_sigset(bss, sss)
|
||||
svr4_sigemptyset(sss);
|
||||
for (i = 1; i < NSIG; i++) {
|
||||
if (sigismember(bss, i)) {
|
||||
newsig = native_to_svr4_sig[i];
|
||||
newsig = native_to_svr4_signo[i];
|
||||
if (newsig)
|
||||
svr4_sigaddset(sss, newsig);
|
||||
}
|
||||
@ -368,7 +368,7 @@ svr4_32_sys_sigaction(p, v, retval)
|
||||
return (error);
|
||||
svr4_32_to_native_sigaction(&nssa, &nbsa);
|
||||
}
|
||||
error = sigaction1(p, svr4_to_native_sig[SCARG(uap, signum)],
|
||||
error = sigaction1(p, svr4_to_native_signo[SCARG(uap, signum)],
|
||||
SCARG(uap, nsa) ? &nbsa : 0, SCARG(uap, osa) ? &obsa : 0);
|
||||
if (error)
|
||||
return (error);
|
||||
@ -430,7 +430,7 @@ svr4_32_sys_signal(p, v, retval)
|
||||
syscallarg(int) signum;
|
||||
syscallarg(svr4_32_sig_t) handler;
|
||||
} */ *uap = v;
|
||||
int signum = svr4_to_native_sig[SVR4_SIGNO(SCARG(uap, signum))];
|
||||
int signum = svr4_to_native_signo[SVR4_SIGNO(SCARG(uap, signum))];
|
||||
struct sigaction nbsa, obsa;
|
||||
sigset_t ss;
|
||||
int error;
|
||||
@ -615,7 +615,7 @@ svr4_32_sys_kill(p, v, retval)
|
||||
struct sys_kill_args ka;
|
||||
|
||||
SCARG(&ka, pid) = SCARG(uap, pid);
|
||||
SCARG(&ka, signum) = svr4_to_native_sig[SCARG(uap, signum)];
|
||||
SCARG(&ka, signum) = svr4_to_native_signo[SCARG(uap, signum)];
|
||||
return sys_kill(p, &ka, retval);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user