Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/usb revert previous. testing queue number requires l...
details: https://anonhg.NetBSD.org/src/rev/e7c16ad46145
branches: trunk
changeset: 780238:e7c16ad46145
user: cegger <cegger%NetBSD.org@localhost>
date: Tue Jul 17 10:33:46 2012 +0000
description:
revert previous. testing queue number requires lock held.
diffstat:
sys/dev/usb/usb.c | 13 ++++++-------
1 files changed, 6 insertions(+), 7 deletions(-)
diffs (36 lines):
diff -r 1b761de4e445 -r e7c16ad46145 sys/dev/usb/usb.c
--- a/sys/dev/usb/usb.c Tue Jul 17 10:18:43 2012 +0000
+++ b/sys/dev/usb/usb.c Tue Jul 17 10:33:46 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: usb.c,v 1.131 2012/07/17 10:18:43 cegger Exp $ */
+/* $NetBSD: usb.c,v 1.132 2012/07/17 10:33:46 cegger Exp $ */
/*
* Copyright (c) 1998, 2002, 2008, 2012 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: usb.c,v 1.131 2012/07/17 10:18:43 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: usb.c,v 1.132 2012/07/17 10:33:46 cegger Exp $");
#include "opt_compat_netbsd.h"
#include "opt_usb.h"
@@ -364,13 +364,12 @@
{
struct usb_taskq *taskq;
- if (task->queue == -1)
- return;
-
taskq = &usb_taskq[task->queue];
mutex_enter(&taskq->lock);
- TAILQ_REMOVE(&taskq->tasks, task, next);
- task->queue = -1;
+ if (task->queue != -1) {
+ TAILQ_REMOVE(&taskq->tasks, task, next);
+ task->queue = -1;
+ }
mutex_exit(&taskq->lock);
}
Home |
Main Index |
Thread Index |
Old Index