From owner-freebsd-usb@FreeBSD.ORG Sat Sep 3 14:21:41 2005 Return-Path: X-Original-To: freebsd-usb@freebsd.org Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8924A16A41F for ; Sat, 3 Sep 2005 14:21:41 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id F102F43D48 for ; Sat, 3 Sep 2005 14:21:40 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [127.0.0.1] (may be forged)) by harmony.bsdimp.com (8.13.3/8.13.3) with ESMTP id j83EJULg052978; Sat, 3 Sep 2005 08:19:30 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sat, 03 Sep 2005 08:20:01 -0600 (MDT) Message-Id: <20050903.082001.50696105.imp@bsdimp.com> To: sebastien.bourdeauducq@gmail.com From: "M. Warner Losh" In-Reply-To: <20050903.081802.78021370.imp@bsdimp.com> References: <200509031614.51362.sebastien.bourdeauducq@gmail.com> <20050903.081802.78021370.imp@bsdimp.com> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Sat, 03 Sep 2005 08:19:30 -0600 (MDT) Cc: freebsd-usb@freebsd.org Subject: Re: Mutexes in USB callbacks ? X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Sep 2005 14:21:41 -0000 In message: <20050903.081802.78021370.imp@bsdimp.com> M. Warner Losh writes: : In message: <200509031614.51362.sebastien.bourdeauducq@gmail.com> : Sebastien writes: : : Hello, : : Is it finally possible or not to acquire a mutex in an USB callback function, : : under FreeBSD 5-STABLE ? : : I have controversial information about this :( : : Since the callback functions are called from an interrupt handler : which is an ithread protected by Giant, there should be no problems : doing this. However, since it is an ithread, and usb is a commonly shared device, any sleeping you do there will delay other device's interrupt hanlders from running. Warner