one question on mutex.

satish kondapalli nitw.satish at gmail.com
Mon Sep 26 14:54:11 UTC 2011


I declared one test mutex  in my char module:
struct mtx test_mutex;

Initialized the above mutex while module loading:
mtx_init(&test_mutex,"cdev_test_mutex",NULL,MTX_DEF);

and in charter device open() function I called mtx_lock() twice. 
mtx_lock(&test_mutex);
mtx_lock(&test_mutex);

Here my question is why the kernel is not blocking on second call of
mtx_lock() ?
Here i initilaized my mutex type as MTX_DEF. All default MTX_DEF are
recursive? (then what is MTX_RECURSE ).


--
View this message in context: http://freebsd.1045724.n5.nabble.com/one-question-on-mutex-tp4841580p4841580.html
Sent from the freebsd-drivers mailing list archive at Nabble.com.


More information about the freebsd-drivers mailing list