Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/usermode/dev Remove excess signal stack declaration...



details:   https://anonhg.NetBSD.org/src/rev/b01210b5d7d4
branches:  trunk
changeset: 769532:b01210b5d7d4
user:      reinoud <reinoud%NetBSD.org@localhost>
date:      Tue Sep 13 10:40:26 2011 +0000

description:
Remove excess signal stack declarations and remove the clock and ld signals
from the signal stack since they are only issued shortly.

diffstat:

 sys/arch/usermode/dev/ld_thunkbus.c |  17 ++++-------------
 1 files changed, 4 insertions(+), 13 deletions(-)

diffs (60 lines):

diff -r 477ce7ed429e -r b01210b5d7d4 sys/arch/usermode/dev/ld_thunkbus.c
--- a/sys/arch/usermode/dev/ld_thunkbus.c       Tue Sep 13 10:38:48 2011 +0000
+++ b/sys/arch/usermode/dev/ld_thunkbus.c       Tue Sep 13 10:40:26 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ld_thunkbus.c,v 1.13 2011/09/12 12:25:45 reinoud Exp $ */
+/* $NetBSD: ld_thunkbus.c,v 1.14 2011/09/13 10:40:26 reinoud Exp $ */
 
 /*-
  * Copyright (c) 2011 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ld_thunkbus.c,v 1.13 2011/09/12 12:25:45 reinoud Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ld_thunkbus.c,v 1.14 2011/09/13 10:40:26 reinoud Exp $");
 
 #include <sys/param.h>
 #include <sys/proc.h>
@@ -92,7 +92,6 @@
        struct thunkbus_attach_args *taa = opaque;
        const char *path = taa->u.diskimage.path;
        struct sigaction sa;
-       stack_t ss;
        ssize_t size, blksize;
 
        ld->sc_dv = self;
@@ -122,16 +121,8 @@
        sc->sc_ih = softint_establish(SOFTINT_BIO,
            ld_thunkbus_complete, sc);
 
-       ss.ss_sp = thunk_malloc(SIGSTKSZ);
-       if (ss.ss_sp == NULL)
-               panic("%s: couldn't allocate signal stack", __func__);
-       ss.ss_size = SIGSTKSZ;
-       ss.ss_flags = 0;
-       if (thunk_sigaltstack(&ss, NULL) == -1)
-               panic("%s: couldn't setup signal stack", __func__);
-
        sigemptyset(&sa.sa_mask);
-       sa.sa_flags = SA_RESTART | SA_SIGINFO | SA_ONSTACK;
+       sa.sa_flags = SA_RESTART | SA_SIGINFO;
        sa.sa_sigaction = ld_thunkbus_sig;
        thunk_sigaddset(&sa.sa_mask, SIGALRM);
        if (thunk_sigaction(SIGIO, &sa, NULL) == -1)
@@ -176,6 +167,7 @@
                bp->b_resid = bp->b_bcount;
        }
 
+//printf("\tfin\n");
        if (bp->b_error)
                printf("error!\n");
 
@@ -208,7 +200,6 @@
            (long long)bp->b_rawblkno,
            (long long)bp->b_bcount);
 #endif
-
        if (bp->b_flags & B_READ)
                error = thunk_aio_read(&tt->tt_aio);
        else



Home | Main Index | Thread Index | Old Index