msleep() on recursivly locked mutexes

M. Warner Losh imp at bsdimp.com
Thu Apr 26 21:50:16 UTC 2007


In message: <200704262136.33196.hselasky at c2i.net>
            Hans Petter Selasky <hselasky at c2i.net> writes:
: Are there any comments on integrating this functionality into msleep(), and 
: adding mtx_drop_recurse() and mtx_pickup_recurse() to the FreeBSD kernel?

This is generally a bad idea.  We allow it for Giant because it has to
be acquired everywhere and we have to drop it in some extremely ugly
places.  To enshrine this behavior for all mutexes strikes me as ill
advised.  Adding additional hacks to recursive mutexes seems wrong to
my way of thinking.

Warner


More information about the freebsd-hackers mailing list