[BACK]Return to linux_machdep.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / compat / linux / arch / i386

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/sys/compat/linux/arch/i386/linux_machdep.c between version 1.65 and 1.66

version 1.65, 2001/06/17 21:01:38 version 1.66, 2001/07/15 20:02:21
Line 150  linux_sendsig(catcher, sig, mask, code)
Line 150  linux_sendsig(catcher, sig, mask, code)
         struct proc *p = curproc;          struct proc *p = curproc;
         struct trapframe *tf;          struct trapframe *tf;
         struct linux_sigframe *fp, frame;          struct linux_sigframe *fp, frame;
           int onstack;
   
         tf = p->p_md.md_regs;          tf = p->p_md.md_regs;
   
           /* Do we need to jump onto the signal stack? */
           onstack =
               (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. */          /* Allocate space for the signal handler context. */
         /* XXX Linux doesn't support the signal stack. */          if (onstack)
         fp = (struct linux_sigframe *)tf->tf_esp;                  fp = (struct linux_sigframe *)((caddr_t)p->p_sigctx.ps_sigstk.ss_sp +
                                             p->p_sigctx.ps_sigstk.ss_size);
           else
                   fp = (struct linux_sigframe *)tf->tf_esp;
         fp--;          fp--;
   
         /* Build stack frame for signal trampoline. */          /* Build stack frame for signal trampoline. */
Line 194  linux_sendsig(catcher, sig, mask, code)
Line 203  linux_sendsig(catcher, sig, mask, code)
         frame.sf_sc.sc_trapno = tf->tf_trapno;          frame.sf_sc.sc_trapno = tf->tf_trapno;
   
         /* Save signal stack. */          /* Save signal stack. */
         /* XXX Linux doesn't support the signal stack. */          /* Linux doesn't save the onstack flag in sigframe */
   
         /* Save signal mask. */          /* Save signal mask. */
         native_to_linux_old_sigset(mask, &frame.sf_sc.sc_mask);          native_to_linux_old_sigset(mask, &frame.sf_sc.sc_mask);
Line 220  linux_sendsig(catcher, sig, mask, code)
Line 229  linux_sendsig(catcher, sig, mask, code)
         tf->tf_ss = GSEL(GUDATA_SEL, SEL_UPL);          tf->tf_ss = GSEL(GUDATA_SEL, SEL_UPL);
   
         /* Remember that we're now on the signal stack. */          /* Remember that we're now on the signal stack. */
         /* XXX Linux doesn't support the signal stack. */          if (onstack)
                   p->p_sigctx.ps_sigstk.ss_flags |= SS_ONSTACK;
 }  }
   
 /*  /*
Line 255  linux_sys_sigreturn(p, v, retval)
Line 265  linux_sys_sigreturn(p, v, retval)
         struct linux_sigcontext *scp, context;          struct linux_sigcontext *scp, context;
         struct trapframe *tf;          struct trapframe *tf;
         sigset_t mask;          sigset_t mask;
           ssize_t ss_gap;
   
         /*          /*
          * The trampoline code hands us the context.           * The trampoline code hands us the context.
Line 305  linux_sys_sigreturn(p, v, retval)
Line 316  linux_sys_sigreturn(p, v, retval)
         tf->tf_ss = context.sc_ss;          tf->tf_ss = context.sc_ss;
   
         /* Restore signal stack. */          /* Restore signal stack. */
         p->p_sigctx.ps_sigstk.ss_flags &= ~SS_ONSTACK;          /*
            * Linux really does it this way; it doesn't have space in sigframe
            * to save the onstack flag.
            */
           ss_gap = (ssize_t)
               ((caddr_t) context.sc_esp_at_signal - (caddr_t) p->p_sigctx.ps_sigstk.ss_sp);
           if (ss_gap >= 0  && ss_gap < p->p_sigctx.ps_sigstk.ss_size)
                   p->p_sigctx.ps_sigstk.ss_flags |= SS_ONSTACK;
           else
                   p->p_sigctx.ps_sigstk.ss_flags &= ~SS_ONSTACK;
   
         /* Restore signal mask. */          /* Restore signal mask. */
         linux_old_to_native_sigset(&context.sc_mask, &mask);          linux_old_to_native_sigset(&context.sc_mask, &mask);

Legend:
Removed from v.1.65  
changed lines
  Added in v.1.66

CVSweb <webmaster@jp.NetBSD.org>