Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Dec 2014 04:34:10 -0300
From:      Martin Galvan <omgalvan.86@gmail.com>
To:        freebsd-drivers@freebsd.org, nparhar@gmail.com
Subject:   Re: Locking a MTX_DEF inside an interrupt thread
Message-ID:  <CAN19L9E5sfypELzXG5Qh7aRyir2A0W8qfJyQy_OBVujs6gW%2BuA@mail.gmail.com>
In-Reply-To: <20141211195821.GA3827@ox>
References:  <CAN19L9FDgn9=UZ9E%2BhAxSQtFXtT=42zoBD0MvJwYW0_dx61nvw@mail.gmail.com> <20141211195821.GA3827@ox>

next in thread | previous in thread | raw e-mail | index | archive | help
2014-12-11 16:58 GMT-03:00 Navdeep Parhar <nparhar@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?



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAN19L9E5sfypELzXG5Qh7aRyir2A0W8qfJyQy_OBVujs6gW%2BuA>