Locking a MTX_DEF inside an interrupt thread

Martin Galvan omgalvan.86 at gmail.com
Fri Dec 12 07:34:11 UTC 2014


2014-12-11 16:58 GMT-03:00 Navdeep Parhar <nparhar at gmail.com>:
> MTX_DEF mutexes can block but never sleep, and it is perfectly safe to acquire
> them in an ithread.

Thanks a lot for your answer. At first I was a bit confused on what
the actual difference between "blocking" and "sleeping" was, but then
I read the "Bounded vs Unbounded Sleep" section from locking(9) and it
cleared things out a bit.

I still don't understand why can't we sleep (i.e. do an 'unbounded
sleep') inside an ithread. What would be the problem, exactly?


More information about the freebsd-drivers mailing list