summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2003-08-07 17:23:44 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2003-08-07 17:23:44 +0000
commit4500851ce172cc989f5aeb19bd39d0da0a4c3f78 (patch)
tree38db906e7adba764156a06dde7c9bcf80fc42f5b
parent2777e1d478faa60f153bbd08d6860145ad4b63e2 (diff)
In sendsig() and sigreturn(), use the SS_xxx flags rather than the SA_xxx
flags (purely cosmetic, as they have the same value). Also some minor indentation/KNF repairs.
-rw-r--r--sys/arch/mvme88k/mvme88k/machdep.c93
1 files changed, 47 insertions, 46 deletions
diff --git a/sys/arch/mvme88k/mvme88k/machdep.c b/sys/arch/mvme88k/mvme88k/machdep.c
index c4befceb41c..db3f8fca725 100644
--- a/sys/arch/mvme88k/mvme88k/machdep.c
+++ b/sys/arch/mvme88k/mvme88k/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.103 2003/08/01 19:53:19 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.104 2003/08/07 17:23:43 miod Exp $ */
/*
* Copyright (c) 1998, 1999, 2000, 2001 Steve Murphree, Jr.
* Copyright (c) 1996 Nivas Madhur
@@ -831,8 +831,8 @@ setregs(p, pack, stack, retval)
tf->exip = pack->ep_entry & ~3;
printf("exec @ 0x%x\n", tf->exip);
} else {
- tf->snip = pack->ep_entry & ~3;
- tf->sfip = (pack->ep_entry & ~3) | FIP_V;
+ tf->snip = pack->ep_entry & ~3;
+ tf->sfip = (pack->ep_entry & ~3) | FIP_V;
}
tf->r[2] = stack;
tf->r[31] = stack;
@@ -885,7 +885,7 @@ sendsig(catcher, sig, mask, code, type, val)
int addr;
tf = p->p_md.md_tf;
- oonstack = psp->ps_sigstk.ss_flags & SA_ONSTACK;
+ oonstack = psp->ps_sigstk.ss_flags & SS_ONSTACK;
/*
* Allocate and validate space for the signal handler
* context. Note that if the stack is in data space, the
@@ -895,11 +895,11 @@ sendsig(catcher, sig, mask, code, type, val)
*/
fsize = sizeof(struct sigframe);
if ((psp->ps_flags & SAS_ALTSTACK) &&
- (psp->ps_sigstk.ss_flags & SA_ONSTACK) == 0 &&
+ (psp->ps_sigstk.ss_flags & SS_ONSTACK) == 0 &&
(psp->ps_sigonstack & sigmask(sig))) {
fp = (struct sigframe *)(psp->ps_sigstk.ss_sp +
psp->ps_sigstk.ss_size - fsize);
- psp->ps_sigstk.ss_flags |= SA_ONSTACK;
+ psp->ps_sigstk.ss_flags |= SS_ONSTACK;
} else
fp = (struct sigframe *)(tf->r[31] - fsize);
if ((unsigned)fp <= USRSTACK - ctob(p->p_vmspace->vm_ssize))
@@ -933,9 +933,9 @@ sendsig(catcher, sig, mask, code, type, val)
sizeof(sf.sf_sc.sc_regs));
if (cputyp != CPU_88110) {
/* mc88100 */
- sf.sf_sc.sc_xip = tf->sxip & ~3;
- sf.sf_sc.sc_nip = tf->snip & ~3;
- sf.sf_sc.sc_fip = tf->sfip & ~3;
+ sf.sf_sc.sc_xip = tf->sxip & ~3;
+ sf.sf_sc.sc_nip = tf->snip & ~3;
+ sf.sf_sc.sc_fip = tf->sfip & ~3;
} else {
/* mc88110 */
sf.sf_sc.sc_xip = tf->exip & ~3;
@@ -948,16 +948,16 @@ sendsig(catcher, sig, mask, code, type, val)
sf.sf_sc.sc_fpcr = tf->fpcr;
if (cputyp != CPU_88110) {
/* mc88100 */
- sf.sf_sc.sc_ssbr = tf->ssbr;
- sf.sf_sc.sc_dmt0 = tf->dmt0;
- sf.sf_sc.sc_dmd0 = tf->dmd0;
- sf.sf_sc.sc_dma0 = tf->dma0;
- sf.sf_sc.sc_dmt1 = tf->dmt1;
- sf.sf_sc.sc_dmd1 = tf->dmd1;
- sf.sf_sc.sc_dma1 = tf->dma1;
- sf.sf_sc.sc_dmt2 = tf->dmt2;
- sf.sf_sc.sc_dmd2 = tf->dmd2;
- sf.sf_sc.sc_dma2 = tf->dma2;
+ sf.sf_sc.sc_ssbr = tf->ssbr;
+ sf.sf_sc.sc_dmt0 = tf->dmt0;
+ sf.sf_sc.sc_dmd0 = tf->dmd0;
+ sf.sf_sc.sc_dma0 = tf->dma0;
+ sf.sf_sc.sc_dmt1 = tf->dmt1;
+ sf.sf_sc.sc_dmd1 = tf->dmd1;
+ sf.sf_sc.sc_dma1 = tf->dma1;
+ sf.sf_sc.sc_dmt2 = tf->dmt2;
+ sf.sf_sc.sc_dmd2 = tf->dmd2;
+ sf.sf_sc.sc_dma2 = tf->dma2;
} else {
/* mc88110 */
sf.sf_sc.sc_dsr = tf->dsr;
@@ -1000,8 +1000,8 @@ sendsig(catcher, sig, mask, code, type, val)
addr = p->p_sigcode;
if (cputyp != CPU_88110) {
/* mc88100 */
- tf->snip = (addr & ~3) | NIP_V;
- tf->sfip = (tf->snip + 4) | FIP_V;
+ tf->snip = (addr & ~3) | NIP_V;
+ tf->sfip = (tf->snip + 4) | FIP_V;
} else {
/* mc88110 */
tf->exip = (addr & ~3);
@@ -1029,9 +1029,9 @@ sendsig(catcher, sig, mask, code, type, val)
/* ARGSUSED */
int
sys_sigreturn(p, v, retval)
-struct proc *p;
-void *v;
-register_t *retval;
+ struct proc *p;
+ void *v;
+ register_t *retval;
{
struct sys_sigreturn_args /* {
syscallarg(struct sigcontext *) sigcntxp;
@@ -1074,9 +1074,9 @@ register_t *retval;
bcopy((caddr_t)scp->sc_regs, (caddr_t)tf->r, sizeof(scp->sc_regs));
if (cputyp != CPU_88110) {
/* mc88100 */
- tf->sxip = (scp->sc_xip) | XIP_V;
- tf->snip = (scp->sc_nip) | NIP_V;
- tf->sfip = (scp->sc_fip) | FIP_V;
+ tf->sxip = (scp->sc_xip) | XIP_V;
+ tf->snip = (scp->sc_nip) | NIP_V;
+ tf->sfip = (scp->sc_fip) | FIP_V;
} else {
/* mc88110 */
tf->exip = (scp->sc_xip);
@@ -1089,16 +1089,16 @@ register_t *retval;
tf->fpcr = scp->sc_fpcr;
if (cputyp != CPU_88110) {
/* mc88100 */
- tf->ssbr = scp->sc_ssbr;
- tf->dmt0 = scp->sc_dmt0;
- tf->dmd0 = scp->sc_dmd0;
- tf->dma0 = scp->sc_dma0;
- tf->dmt1 = scp->sc_dmt1;
- tf->dmd1 = scp->sc_dmd1;
- tf->dma1 = scp->sc_dma1;
- tf->dmt2 = scp->sc_dmt2;
- tf->dmd2 = scp->sc_dmd2;
- tf->dma2 = scp->sc_dma2;
+ tf->ssbr = scp->sc_ssbr;
+ tf->dmt0 = scp->sc_dmt0;
+ tf->dmd0 = scp->sc_dmd0;
+ tf->dma0 = scp->sc_dma0;
+ tf->dmt1 = scp->sc_dmt1;
+ tf->dmd1 = scp->sc_dmd1;
+ tf->dma1 = scp->sc_dma1;
+ tf->dmt2 = scp->sc_dmt2;
+ tf->dmd2 = scp->sc_dmd2;
+ tf->dma2 = scp->sc_dma2;
} else {
/* mc88110 */
tf->dsr = scp->sc_dsr;
@@ -1126,9 +1126,9 @@ register_t *retval;
* Restore the user supplied information
*/
if (scp->sc_onstack & 01)
- p->p_sigacts->ps_sigstk.ss_flags |= SA_ONSTACK;
+ p->p_sigacts->ps_sigstk.ss_flags |= SS_ONSTACK;
else
- p->p_sigacts->ps_sigstk.ss_flags &= ~SA_ONSTACK;
+ p->p_sigacts->ps_sigstk.ss_flags &= ~SS_ONSTACK;
p->p_sigmask = scp->sc_mask & ~sigcantmask;
return (EJUSTRETURN);
}
@@ -1469,7 +1469,8 @@ get_slave_stack()
*
* Called from "mvme88k/locore.S"
*/
-void slave_pre_main()
+void
+slave_pre_main()
{
set_cpu_number(cmmu_cpu_number()); /* Determine cpu number by CMMU */
splhigh();
@@ -1970,8 +1971,8 @@ m197_ext_int(u_int v, struct m88100_saved_state *eframe)
int
cpu_exec_aout_makecmds(p, epp)
-struct proc *p;
-struct exec_package *epp;
+ struct proc *p;
+ struct exec_package *epp;
{
#ifdef COMPAT_25
/*
@@ -2209,10 +2210,10 @@ spl0()
void
MY_info(f, p, flags, s)
-struct trapframe *f;
-caddr_t p;
-int flags;
-char *s;
+ struct trapframe *f;
+ caddr_t p;
+ int flags;
+ char *s;
{
regdump(f);
printf("proc %x flags %x type %s\n", p, flags, s);