Mutexes in USB callbacks ?

M. Warner Losh imp at bsdimp.com
Sat Sep 3 07:21:41 PDT 2005


In message: <20050903.081802.78021370.imp at bsdimp.com>
            M. Warner Losh <imp at bsdimp.com> writes:
: In message: <200509031614.51362.sebastien.bourdeauducq at gmail.com>
:             Sebastien <sebastien.bourdeauducq at 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


More information about the freebsd-usb mailing list