Date: Mon, 26 Sep 2011 07:37:32 -0700 (PDT) From: satish kondapalli <nitw.satish@gmail.com> To: freebsd-drivers@freebsd.org Subject: one question on mutex. Message-ID: <1317047852252-4841580.post@n5.nabble.com>
next in thread | raw e-mail | index | archive | help
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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1317047852252-4841580.post>