Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/xen/xen Hold the interlock before cv_broadcast as p...
details: https://anonhg.NetBSD.org/src/rev/76f60191a3ee
branches: trunk
changeset: 349846:76f60191a3ee
user: skrll <skrll%NetBSD.org@localhost>
date: Mon Dec 26 08:16:28 2016 +0000
description:
Hold the interlock before cv_broadcast as per condvar(9)
diffstat:
sys/arch/xen/xen/xbdback_xenbus.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diffs (29 lines):
diff -r 2166fc286842 -r 76f60191a3ee sys/arch/xen/xen/xbdback_xenbus.c
--- a/sys/arch/xen/xen/xbdback_xenbus.c Mon Dec 26 07:55:00 2016 +0000
+++ b/sys/arch/xen/xen/xbdback_xenbus.c Mon Dec 26 08:16:28 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: xbdback_xenbus.c,v 1.62 2016/01/06 15:28:40 bouyer Exp $ */
+/* $NetBSD: xbdback_xenbus.c,v 1.63 2016/12/26 08:16:28 skrll Exp $ */
/*
* Copyright (c) 2006 Manuel Bouyer.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xbdback_xenbus.c,v 1.62 2016/01/06 15:28:40 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xbdback_xenbus.c,v 1.63 2016/12/26 08:16:28 skrll Exp $");
#include <sys/atomic.h>
#include <sys/buf.h>
@@ -1672,9 +1672,8 @@
/* only set RUN state when we are WAITING for work */
if (xbdi->xbdi_status == WAITING)
xbdi->xbdi_status = RUN;
+ cv_broadcast(&xbdi->xbdi_cv);
mutex_exit(&xbdi->xbdi_lock);
-
- cv_broadcast(&xbdi->xbdi_cv);
}
/*
Home |
Main Index |
Thread Index |
Old Index