Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/arm/arm Tidy up a couple of bits to avoid duplicati...



details:   https://anonhg.NetBSD.org/src/rev/663a93c35e9a
branches:  trunk
changeset: 551875:663a93c35e9a
user:      chris <chris%NetBSD.org@localhost>
date:      Sat Sep 13 14:31:34 2003 +0000

description:
Tidy up a couple of bits to avoid duplication within the switch.

diffstat:

 sys/arch/arm/arm/sig_machdep.c |  28 +++++++++++++---------------
 1 files changed, 13 insertions(+), 15 deletions(-)

diffs (58 lines):

diff -r b01cf83bbafd -r 663a93c35e9a sys/arch/arm/arm/sig_machdep.c
--- a/sys/arch/arm/arm/sig_machdep.c    Sat Sep 13 14:09:15 2003 +0000
+++ b/sys/arch/arm/arm/sig_machdep.c    Sat Sep 13 14:31:34 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sig_machdep.c,v 1.18 2003/06/23 11:01:06 martin Exp $  */
+/*     $NetBSD: sig_machdep.c,v 1.19 2003/09/13 14:31:34 chris Exp $   */
 
 /*
  * Copyright (c) 1994-1998 Mark Brinicombe.
@@ -45,7 +45,7 @@
 
 #include <sys/param.h>
 
-__KERNEL_RCSID(0, "$NetBSD: sig_machdep.c,v 1.18 2003/06/23 11:01:06 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sig_machdep.c,v 1.19 2003/09/13 14:31:34 chris Exp $");
 
 #include <sys/mount.h>         /* XXX only needed by syscallargs.h */
 #include <sys/proc.h>
@@ -160,28 +160,26 @@
         * trampoline version numbers are coordinated with machine-
         * dependent code in libc.
         */
+
+       /*
+        * this was all in the switch below, seemed daft to duplicate it, if
+        * we do a new trampoline version it might change then
+        */
+       tf->tf_r0 = sig;
+       tf->tf_r1 = code;
+       tf->tf_r2 = (int)&fp->sf_sc;
+       tf->tf_pc = (int)catcher;
+       tf->tf_usr_sp = (int)fp;
+       
        switch (ps->sa_sigdesc[sig].sd_vers) {
-#if 1 /* COMPAT_16 */
        case 0:         /* legacy on-stack sigtramp */
-               tf->tf_r0 = sig;
-               tf->tf_r1 = code;
-               tf->tf_r2 = (int)&fp->sf_sc;
-               tf->tf_pc = (int)catcher;
-               tf->tf_usr_sp = (int)fp;
                tf->tf_usr_lr = (int)p->p_sigctx.ps_sigcode;
 #ifndef acorn26
                /* XXX This should not be needed. */
                cpu_icache_sync_all();
 #endif
                break;
-#endif /* COMPAT_16 */
-
        case 1:
-               tf->tf_r0 = sig;
-               tf->tf_r1 = code;
-               tf->tf_r2 = (int)&fp->sf_sc;
-               tf->tf_pc = (int)catcher;
-               tf->tf_usr_sp = (int)fp;
                tf->tf_usr_lr = (int)ps->sa_sigdesc[sig].sd_tramp;
                break;
 



Home | Main Index | Thread Index | Old Index