mirror_zfs/include
Ricardo M. Correia c2f997b0b3 Make kmutex_t typesafe in all cases.
When HAVE_MUTEX_OWNER and CONFIG_SMP are defined, kmutex_t is just
a typedef for struct mutex.

This is generally OK but has the downside that it can make mistakes
such as mutex_lock(&kmutex_var) to pass by unnoticed until someone
compiles the code without HAVE_MUTEX_OWNER or CONFIG_SMP (in which
case kmutex_t is a real struct). Note that the correct API to call
should have been mutex_enter() rather than mutex_lock().

We prevent these kind of mistakes by making kmutex_t a real structure
with only one field. This makes kmutex_t typesafe and it shouldn't
have any impact on the generated assembly code.

Signed-off-by: Ricardo M. Correia <ricardo.correia@oracle.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
2010-11-29 11:25:32 -08:00
..
fs Public Release Prep 2010-05-17 15:18:00 -07:00
linux Correctly handle rwsem_is_locked() behavior 2010-08-10 16:43:00 -07:00
rpc Public Release Prep 2010-05-17 15:18:00 -07:00
sharefs Public Release Prep 2010-05-17 15:18:00 -07:00
sys Make kmutex_t typesafe in all cases. 2010-11-29 11:25:32 -08:00
util Add missing header util/sscanf.h 2010-06-14 14:20:31 -07:00
vm Public Release Prep 2010-05-17 15:18:00 -07:00
.gitignore sun-misc-gitignore 2010-01-08 09:37:54 -08:00
Makefile.am Support custom build directories 2010-09-05 21:49:05 -07:00
Makefile.in Support custom build directories 2010-09-05 21:49:05 -07:00
spl-ctl.h Public Release Prep 2010-05-17 15:18:00 -07:00
spl-debug.h Prefix all SPL debug macros with 'S' 2010-07-20 13:30:40 -07:00
spl-device.h Public Release Prep 2010-05-17 15:18:00 -07:00
spl-trace.h Split <sys/debug.h> header 2010-07-20 13:29:35 -07:00
splat-ctl.h Public Release Prep 2010-05-17 15:18:00 -07:00
strings.h Public Release Prep 2010-05-17 15:18:00 -07:00
unistd.h Public Release Prep 2010-05-17 15:18:00 -07:00