mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-11-17 10:01:01 +03:00
c2f997b0b3
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> |
||
---|---|---|
.. | ||
fs | ||
linux | ||
rpc | ||
sharefs | ||
sys | ||
util | ||
vm | ||
.gitignore | ||
Makefile.am | ||
Makefile.in | ||
spl-ctl.h | ||
spl-debug.h | ||
spl-device.h | ||
spl-trace.h | ||
splat-ctl.h | ||
strings.h | ||
unistd.h |