Disable optimization of spinlocks on UP kernels w/o debugging for now
since it breaks mtx_owned() on spin mutexes when used outside of mtx_assert(). Unfortunately we currently use it in the i386 MD code and in the sio(4) driver. Reported by: bde
This commit is contained in:
parent
bd850b6750
commit
2f0789c8ef
@ -403,7 +403,7 @@ _mtx_lock_spin_flags(struct mtx *m, int opts, const char *file, int line)
|
||||
{
|
||||
|
||||
MPASS(curthread != NULL);
|
||||
#if defined(SMP) || LOCK_DEBUG > 0
|
||||
#if defined(SMP) || LOCK_DEBUG > 0 || 1
|
||||
_get_spin_lock(m, curthread, opts, file, line);
|
||||
#else
|
||||
critical_enter();
|
||||
@ -422,7 +422,7 @@ _mtx_unlock_spin_flags(struct mtx *m, int opts, const char *file, int line)
|
||||
WITNESS_UNLOCK(&m->mtx_object, opts | LOP_EXCLUSIVE, file, line);
|
||||
LOCK_LOG_LOCK("UNLOCK", &m->mtx_object, opts, m->mtx_recurse, file,
|
||||
line);
|
||||
#if defined(SMP) || LOCK_DEBUG > 0
|
||||
#if defined(SMP) || LOCK_DEBUG > 0 || 1
|
||||
_rel_spin_lock(m);
|
||||
#else
|
||||
critical_exit();
|
||||
|
@ -403,7 +403,7 @@ _mtx_lock_spin_flags(struct mtx *m, int opts, const char *file, int line)
|
||||
{
|
||||
|
||||
MPASS(curthread != NULL);
|
||||
#if defined(SMP) || LOCK_DEBUG > 0
|
||||
#if defined(SMP) || LOCK_DEBUG > 0 || 1
|
||||
_get_spin_lock(m, curthread, opts, file, line);
|
||||
#else
|
||||
critical_enter();
|
||||
@ -422,7 +422,7 @@ _mtx_unlock_spin_flags(struct mtx *m, int opts, const char *file, int line)
|
||||
WITNESS_UNLOCK(&m->mtx_object, opts | LOP_EXCLUSIVE, file, line);
|
||||
LOCK_LOG_LOCK("UNLOCK", &m->mtx_object, opts, m->mtx_recurse, file,
|
||||
line);
|
||||
#if defined(SMP) || LOCK_DEBUG > 0
|
||||
#if defined(SMP) || LOCK_DEBUG > 0 || 1
|
||||
_rel_spin_lock(m);
|
||||
#else
|
||||
critical_exit();
|
||||
|
@ -263,7 +263,7 @@ extern int mtx_pool_valid;
|
||||
_get_sleep_lock((m), curthread, (opts), LOCK_FILE, LOCK_LINE)
|
||||
#define mtx_unlock_flags(m, opts) \
|
||||
_rel_sleep_lock((m), curthread, (opts), LOCK_FILE, LOCK_LINE)
|
||||
#ifdef SMP
|
||||
#ifndef SMPnotyet
|
||||
#define mtx_lock_spin_flags(m, opts) \
|
||||
_get_spin_lock((m), curthread, (opts), LOCK_FILE, LOCK_LINE)
|
||||
#define mtx_unlock_spin_flags(m, opts) \
|
||||
|
Loading…
Reference in New Issue
Block a user