Source-Changes-HG archive

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

[src/trunk]: src/sys/kern Since pr_lock is now used to wait for two things no...



details:   https://anonhg.NetBSD.org/src/rev/70d696b9969d
branches:  trunk
changeset: 827701:70d696b9969d
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Nov 09 15:40:23 2017 +0000

description:
Since pr_lock is now used to wait for two things now (PR_GROWING and
PR_WANTED) we need to loop for the condition we wanted.

diffstat:

 sys/kern/subr_pool.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (29 lines):

diff -r 845d6eac7f84 -r 70d696b9969d sys/kern/subr_pool.c
--- a/sys/kern/subr_pool.c      Thu Nov 09 15:24:39 2017 +0000
+++ b/sys/kern/subr_pool.c      Thu Nov 09 15:40:23 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: subr_pool.c,v 1.211 2017/11/06 18:41:22 riastradh Exp $        */
+/*     $NetBSD: subr_pool.c,v 1.212 2017/11/09 15:40:23 christos Exp $ */
 
 /*-
  * Copyright (c) 1997, 1999, 2000, 2002, 2007, 2008, 2010, 2014, 2015
@@ -33,7 +33,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: subr_pool.c,v 1.211 2017/11/06 18:41:22 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_pool.c,v 1.212 2017/11/09 15:40:23 christos Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ddb.h"
@@ -790,7 +790,9 @@
                         * it be?
                         */
                        pp->pr_flags |= PR_WANTED;
-                       cv_wait(&pp->pr_cv, &pp->pr_lock);
+                       do {
+                               cv_wait(&pp->pr_cv, &pp->pr_lock);
+                       } while (pp->pr_flags & PR_WANTED);
                        goto startover;
                }
 



Home | Main Index | Thread Index | Old Index