aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorRicardo M. Correia <[email protected]>2010-11-22 00:20:58 -0800
committerBrian Behlendorf <[email protected]>2010-11-29 11:25:32 -0800
commitc2f997b0b3b9a79b7146c8883aa09326e5def253 (patch)
tree6dc6bdb814f441bb5d6e567d9b786fe200aed3ad /config
parent058de03caaefe63086559662f2abaed1edf0e086 (diff)
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 <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]>
Diffstat (limited to 'config')
0 files changed, 0 insertions, 0 deletions