Source-Changes-HG archive

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

[src/sommerfeld_i386mp_1]: src/sys/arch/i386/i386 Pull up 1.425: ps_sigstk mo...



details:   https://anonhg.NetBSD.org/src/rev/c216a995a785
branches:  sommerfeld_i386mp_1
changeset: 482326:c216a995a785
user:      sommerfeld <sommerfeld%NetBSD.org@localhost>
date:      Fri Dec 29 21:25:47 2000 +0000

description:
Pull up 1.425: ps_sigstk moved from from p_sigacts to p_sigctx.

diffstat:

 sys/arch/i386/i386/machdep.c |  21 ++++++++++-----------
 1 files changed, 10 insertions(+), 11 deletions(-)

diffs (73 lines):

diff -r 195c9be5a2ec -r c216a995a785 sys/arch/i386/i386/machdep.c
--- a/sys/arch/i386/i386/machdep.c      Fri Dec 29 21:21:58 2000 +0000
+++ b/sys/arch/i386/i386/machdep.c      Fri Dec 29 21:25:47 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.376.2.9 2000/09/19 14:26:08 sommerfeld Exp $     */
+/*     $NetBSD: machdep.c,v 1.376.2.10 2000/12/29 21:25:47 sommerfeld Exp $    */
 
 /*-
  * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -935,20 +935,19 @@
        struct proc *p = curproc;
        struct trapframe *tf;
        struct sigframe *fp, frame;
-       struct sigacts *psp = p->p_sigacts;
        int onstack;
 
        tf = p->p_md.md_regs;
 
        /* Do we need to jump onto the signal stack? */
        onstack =
-           (psp->ps_sigstk.ss_flags & (SS_DISABLE | SS_ONSTACK)) == 0 &&
-           (psp->ps_sigact[sig].sa_flags & SA_ONSTACK) != 0;
+           (p->p_sigctx.ps_sigstk.ss_flags & (SS_DISABLE | SS_ONSTACK)) == 0 &&
+           (SIGACTION(p, sig).sa_flags & SA_ONSTACK) != 0;
 
        /* Allocate space for the signal handler context. */
        if (onstack)
-               fp = (struct sigframe *)((caddr_t)psp->ps_sigstk.ss_sp +
-                                                 psp->ps_sigstk.ss_size);
+               fp = (struct sigframe *)((caddr_t)p->p_sigctx.ps_sigstk.ss_sp +
+                                         p->p_sigctx.ps_sigstk.ss_size);
        else
                fp = (struct sigframe *)tf->tf_esp;
        fp--;
@@ -991,7 +990,7 @@
        frame.sf_sc.sc_err = tf->tf_err;
 
        /* Save signal stack. */
-       frame.sf_sc.sc_onstack = psp->ps_sigstk.ss_flags & SS_ONSTACK;
+       frame.sf_sc.sc_onstack = p->p_sigctx.ps_sigstk.ss_flags & SS_ONSTACK;
 
        /* Save signal mask. */
        frame.sf_sc.sc_mask = *mask;
@@ -1022,7 +1021,7 @@
        __asm("movl %w0,%%fs" : : "r" (GSEL(GUDATA_SEL, SEL_UPL)));
        tf->tf_es = GSEL(GUDATA_SEL, SEL_UPL);
        tf->tf_ds = GSEL(GUDATA_SEL, SEL_UPL);
-       tf->tf_eip = (int)psp->ps_sigcode;
+       tf->tf_eip = (int)p->p_sigctx.ps_sigcode;
        tf->tf_cs = GSEL(GUCODE_SEL, SEL_UPL);
        tf->tf_eflags &= ~(PSL_T|PSL_VM|PSL_AC);
        tf->tf_esp = (int)fp;
@@ -1030,7 +1029,7 @@
 
        /* Remember that we're now on the signal stack. */
        if (onstack)
-               psp->ps_sigstk.ss_flags |= SS_ONSTACK;
+               p->p_sigctx.ps_sigstk.ss_flags |= SS_ONSTACK;
 }
 
 /*
@@ -1105,9 +1104,9 @@
 
        /* Restore signal stack. */
        if (context.sc_onstack & SS_ONSTACK)
-               p->p_sigacts->ps_sigstk.ss_flags |= SS_ONSTACK;
+               p->p_sigctx.ps_sigstk.ss_flags |= SS_ONSTACK;
        else
-               p->p_sigacts->ps_sigstk.ss_flags &= ~SS_ONSTACK;
+               p->p_sigctx.ps_sigstk.ss_flags &= ~SS_ONSTACK;
 
        /* Restore signal mask. */
        (void) sigprocmask1(p, SIG_SETMASK, &context.sc_mask, 0);



Home | Main Index | Thread Index | Old Index