Source-Changes-HG archive

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

[src/thorpej_scsipi]: src/sys/dev/scsipi In channel completion thread, tsleep...



details:   https://anonhg.NetBSD.org/src/rev/ddc2d9c52f48
branches:  thorpej_scsipi
changeset: 477484:ddc2d9c52f48
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Mon Apr 23 12:33:34 2001 +0000

description:
In channel completion thread, tsleep() at splbio, to avoid race condition
where scsipi_done would put something in the queue and wakeup between
splx(s) and tsleep().

diffstat:

 sys/dev/scsipi/scsipi_base.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (20 lines):

diff -r 55c43914cf21 -r ddc2d9c52f48 sys/dev/scsipi/scsipi_base.c
--- a/sys/dev/scsipi/scsipi_base.c      Mon Apr 23 09:41:25 2001 +0000
+++ b/sys/dev/scsipi/scsipi_base.c      Mon Apr 23 12:33:34 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: scsipi_base.c,v 1.26.2.16 2001/04/23 01:03:34 mjacob Exp $     */
+/*     $NetBSD: scsipi_base.c,v 1.26.2.17 2001/04/23 12:33:34 bouyer Exp $     */
 
 /*-
  * Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
@@ -1830,9 +1830,9 @@
                xs = TAILQ_FIRST(&chan->chan_complete);
                if (xs == NULL &&
                    (chan->chan_flags & SCSIPI_CHAN_SHUTDOWN) == 0) {
-                       splx(s);
                        (void) tsleep(&chan->chan_complete, PRIBIO,
                            "sccomp", 0);
+                       splx(s);
                        continue;
                }
                if (chan->chan_flags & SCSIPI_CHAN_SHUTDOWN) {



Home | Main Index | Thread Index | Old Index