Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/raidframe Release our hold on raidPtr if we're going...



details:   https://anonhg.NetBSD.org/src/rev/1d562442a745
branches:  trunk
changeset: 536436:1d562442a745
user:      oster <oster%NetBSD.org@localhost>
date:      Sun Sep 15 23:40:40 2002 +0000

description:
Release our hold on raidPtr if we're going to sleep.

diffstat:

 sys/dev/raidframe/rf_engine.c |  10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diffs (32 lines):

diff -r 007d8d46a663 -r 1d562442a745 sys/dev/raidframe/rf_engine.c
--- a/sys/dev/raidframe/rf_engine.c     Sun Sep 15 23:27:08 2002 +0000
+++ b/sys/dev/raidframe/rf_engine.c     Sun Sep 15 23:40:40 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rf_engine.c,v 1.16 2002/09/14 17:53:59 oster Exp $     */
+/*     $NetBSD: rf_engine.c,v 1.17 2002/09/15 23:40:40 oster Exp $     */
 /*
  * Copyright (c) 1995 Carnegie-Mellon University.
  * All rights reserved.
@@ -55,7 +55,7 @@
  ****************************************************************************/
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rf_engine.c,v 1.16 2002/09/14 17:53:59 oster Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_engine.c,v 1.17 2002/09/15 23:40:40 oster Exp $");
 
 #include "rf_threadstuff.h"
 
@@ -802,8 +802,12 @@
 
                        DO_LOCK(raidPtr);
                }
-               while (!raidPtr->shutdown_engine && raidPtr->node_queue == NULL)
+               while (!raidPtr->shutdown_engine && 
+                      raidPtr->node_queue == NULL) {
+                       DO_UNLOCK(raidPtr);
                        DO_WAIT(raidPtr);
+                       DO_LOCK(raidPtr);
+               }
        }
        DO_UNLOCK(raidPtr);
 



Home | Main Index | Thread Index | Old Index