Acquiring a mtx after an sx lock
Max Laier
max at love2party.net
Mon Aug 18 15:54:22 UTC 2008
On Monday 18 August 2008 17:14:01 Ryan Stone wrote:
> Are there any problems acquiring a sleep mutex after acquiring an sx lock?
> man 9 locking says that you can't, but doesn't provide any reasons.
> Obviously while you're holding the mutex you have to abide by the rules
> applying to mutexes, but as long as you do that, I can't see why acquiring
> a mutex after an sx lock would cause an issue. Is the locking man page
> wrong about this?
Where does it say so? The interaction table clearly shows:
You have: You want: Spin_mtx Slp_mtx sx_lock rw_lock rm_locksleep
SPIN mutex ok-1 no no no no no-3
Sleep mutex ok ok-1 no ok ok no-3
|
V
sx_lock ok -->ok<-- ok-2 ok ok ok-4
^
|
rw_lock ok ok no ok-2 ok no-3
rm_lock ok ok no ok ok-2 no
--
/"\ Best regards, | mlaier at freebsd.org
\ / Max Laier | ICQ #67774661
X http://pf4freebsd.love2party.net/ | mlaier at EFnet
/ \ ASCII Ribbon Campaign | Against HTML Mail and News
More information about the freebsd-hackers
mailing list