diff options
author | scottl <scottl@FreeBSD.org> | 2003-05-18 03:46:30 +0000 |
---|---|---|
committer | scottl <scottl@FreeBSD.org> | 2003-05-18 03:46:30 +0000 |
commit | 9d8764a0c1832d23a677221f5dfbf59b43057b7d (patch) | |
tree | 65adb7dd84caf189192b068da047b2a3bb692e0c /sys | |
parent | ccb0d434079066433da71a6924fe89c801212acb (diff) | |
download | FreeBSD-src-9d8764a0c1832d23a677221f5dfbf59b43057b7d.zip FreeBSD-src-9d8764a0c1832d23a677221f5dfbf59b43057b7d.tar.gz |
Add the MUTEX_NOINLINE option that explicitely de-inlines the mutex
operations.
Submitted by: jhb
Diffstat (limited to 'sys')
-rw-r--r-- | sys/conf/options | 1 | ||||
-rw-r--r-- | sys/sys/mutex.h | 6 |
2 files changed, 4 insertions, 3 deletions
diff --git a/sys/conf/options b/sys/conf/options index f708e19..0e25b4e 100644 --- a/sys/conf/options +++ b/sys/conf/options @@ -433,6 +433,7 @@ LPT_DEBUG opt_lpt.h PLIP_DEBUG opt_plip.h LOCKF_DEBUG opt_debug_lockf.h MUTEX_DEBUG opt_global.h +MUTEX_NOINLINE opt_global.h MUTEX_PROFILING opt_global.h NPX_DEBUG opt_debug_npx.h NETATALKDEBUG opt_atalk.h diff --git a/sys/sys/mutex.h b/sys/sys/mutex.h index b85edc7..8bf3344 100644 --- a/sys/sys/mutex.h +++ b/sys/sys/mutex.h @@ -246,7 +246,7 @@ extern int mtx_pool_valid; #ifndef LOCK_DEBUG #error LOCK_DEBUG not defined, include <sys/lock.h> before <sys/mutex.h> #endif -#if LOCK_DEBUG > 0 +#if LOCK_DEBUG > 0 || defined(MUTEX_NOINLINE) #define mtx_lock_flags(m, opts) \ _mtx_lock_flags((m), (opts), LOCK_FILE, LOCK_LINE) #define mtx_unlock_flags(m, opts) \ @@ -255,7 +255,7 @@ extern int mtx_pool_valid; _mtx_lock_spin_flags((m), (opts), LOCK_FILE, LOCK_LINE) #define mtx_unlock_spin_flags(m, opts) \ _mtx_unlock_spin_flags((m), (opts), LOCK_FILE, LOCK_LINE) -#else /* LOCK_DEBUG == 0 */ +#else /* LOCK_DEBUG == 0 && !MUTEX_NOINLINE */ #define mtx_lock_flags(m, opts) \ _get_sleep_lock((m), curthread, (opts), LOCK_FILE, LOCK_LINE) #define mtx_unlock_flags(m, opts) \ @@ -269,7 +269,7 @@ extern int mtx_pool_valid; #define mtx_lock_spin_flags(m, opts) critical_enter() #define mtx_unlock_spin_flags(m, opts) critical_exit() #endif /* SMP */ -#endif /* LOCK_DEBUG */ +#endif /* LOCK_DEBUG > 0 || MUTEX_NOINLINE */ #define mtx_trylock_flags(m, opts) \ _mtx_trylock((m), (opts), LOCK_FILE, LOCK_LINE) |