Broadcast instead of signal since the condition is a boolean.

This commit is contained in:
pooka 2010-09-06 18:03:57 +00:00
parent 8664a51e24
commit 6b2c39723d

View File

@ -1,4 +1,4 @@
/* $NetBSD: rumpblk.c,v 1.41 2010/06/21 14:25:35 pooka Exp $ */ /* $NetBSD: rumpblk.c,v 1.42 2010/09/06 18:03:57 pooka Exp $ */
/* /*
* Copyright (c) 2009 Antti Kantee. All Rights Reserved. * Copyright (c) 2009 Antti Kantee. All Rights Reserved.
@ -52,7 +52,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: rumpblk.c,v 1.41 2010/06/21 14:25:35 pooka Exp $"); __KERNEL_RCSID(0, "$NetBSD: rumpblk.c,v 1.42 2010/09/06 18:03:57 pooka Exp $");
#include <sys/param.h> #include <sys/param.h>
#include <sys/buf.h> #include <sys/buf.h>
@ -272,7 +272,7 @@ putwindow(struct rblkdev *rblk, struct blkwin *win)
mutex_enter(&rblk->rblk_memmtx); mutex_enter(&rblk->rblk_memmtx);
if (--win->win_refcnt == 0 && rblk->rblk_waiting) { if (--win->win_refcnt == 0 && rblk->rblk_waiting) {
rblk->rblk_waiting = false; rblk->rblk_waiting = false;
cv_signal(&rblk->rblk_memcv); cv_broadcast(&rblk->rblk_memcv);
} }
KASSERT(win->win_refcnt >= 0); KASSERT(win->win_refcnt >= 0);
mutex_exit(&rblk->rblk_memmtx); mutex_exit(&rblk->rblk_memmtx);