Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 03 Sep 2005 08:20:01 -0600 (MDT)
From:      "M. Warner Losh" <imp@bsdimp.com>
To:        sebastien.bourdeauducq@gmail.com
Cc:        freebsd-usb@freebsd.org
Subject:   Re: Mutexes in USB callbacks ?
Message-ID:  <20050903.082001.50696105.imp@bsdimp.com>
In-Reply-To: <20050903.081802.78021370.imp@bsdimp.com>
References:  <200509031614.51362.sebastien.bourdeauducq@gmail.com> <20050903.081802.78021370.imp@bsdimp.com>

next in thread | previous in thread | raw e-mail | index | archive | help
In message: <20050903.081802.78021370.imp@bsdimp.com>
            M. Warner Losh <imp@bsdimp.com> writes:
: In message: <200509031614.51362.sebastien.bourdeauducq@gmail.com>
:             Sebastien <sebastien.bourdeauducq@gmail.com> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050903.082001.50696105.imp>