msleep() on recursivly locked mutexes

John Baldwin jhb at freebsd.org
Fri Apr 27 19:03:05 UTC 2007


On Thursday 26 April 2007 03:36:33 pm Hans Petter Selasky wrote:
> Are there any comments on integrating this functionality into msleep(), and 
> adding mtx_drop_recurse() and mtx_pickup_recurse() to the FreeBSD kernel?

Nope.  Fix the code to not recurse instead, or to know it has a recursed mutex 
and make sure it doesn't call mtx_sleep() or cv_wait() with a recursed lock.  
It's not that hard to do.  The rest of the kernel manages that restriction 
fine.

-- 
John Baldwin


More information about the freebsd-hackers mailing list