mtx: plug the 'opts' argument when not used
This commit is contained in:
parent
68a558eca2
commit
a24c8eb847
@ -429,7 +429,7 @@ __mtx_lock_sleep(volatile uintptr_t *c, uintptr_t v, uintptr_t tid, int opts,
|
||||
const char *file, int line)
|
||||
#else
|
||||
void
|
||||
__mtx_lock_sleep(volatile uintptr_t *c, uintptr_t v, uintptr_t tid, int opts)
|
||||
__mtx_lock_sleep(volatile uintptr_t *c, uintptr_t v, uintptr_t tid)
|
||||
#endif
|
||||
{
|
||||
struct mtx *m;
|
||||
@ -471,14 +471,18 @@ __mtx_lock_sleep(volatile uintptr_t *c, uintptr_t v, uintptr_t tid, int opts)
|
||||
(opts & MTX_RECURSE) != 0,
|
||||
("_mtx_lock_sleep: recursed on non-recursive mutex %s @ %s:%d\n",
|
||||
m->lock_object.lo_name, file, line));
|
||||
#if LOCK_DEBUG > 0
|
||||
opts &= ~MTX_RECURSE;
|
||||
#endif
|
||||
m->mtx_recurse++;
|
||||
atomic_set_ptr(&m->mtx_lock, MTX_RECURSED);
|
||||
if (LOCK_LOG_TEST(&m->lock_object, opts))
|
||||
CTR1(KTR_LOCK, "_mtx_lock_sleep: %p recursing", m);
|
||||
return;
|
||||
}
|
||||
#if LOCK_DEBUG > 0
|
||||
opts &= ~MTX_RECURSE;
|
||||
#endif
|
||||
|
||||
#ifdef HWPMC_HOOKS
|
||||
PMC_SOFT_CALL( , , lock, failed);
|
||||
@ -873,7 +877,7 @@ void
|
||||
__mtx_unlock_sleep(volatile uintptr_t *c, int opts, const char *file, int line)
|
||||
#else
|
||||
void
|
||||
__mtx_unlock_sleep(volatile uintptr_t *c, int opts)
|
||||
__mtx_unlock_sleep(volatile uintptr_t *c)
|
||||
#endif
|
||||
{
|
||||
struct mtx *m;
|
||||
|
@ -154,8 +154,13 @@ struct lock_class {
|
||||
* file - file name
|
||||
* line - line number
|
||||
*/
|
||||
#if LOCK_DEBUG > 0
|
||||
#define LOCK_LOG_TEST(lo, flags) \
|
||||
(((flags) & LOP_QUIET) == 0 && ((lo)->lo_flags & LO_QUIET) == 0)
|
||||
#else
|
||||
#define LOCK_LOG_TEST(lo, flags) 0
|
||||
#endif
|
||||
|
||||
|
||||
#define LOCK_LOG_LOCK(opname, lo, flags, recurse, file, line) do { \
|
||||
if (LOCK_LOG_TEST((lo), (flags))) \
|
||||
|
@ -104,9 +104,8 @@ void __mtx_lock_sleep(volatile uintptr_t *c, uintptr_t v, uintptr_t tid,
|
||||
void __mtx_unlock_sleep(volatile uintptr_t *c, int opts, const char *file,
|
||||
int line);
|
||||
#else
|
||||
void __mtx_lock_sleep(volatile uintptr_t *c, uintptr_t v, uintptr_t tid,
|
||||
int opts);
|
||||
void __mtx_unlock_sleep(volatile uintptr_t *c, int opts);
|
||||
void __mtx_lock_sleep(volatile uintptr_t *c, uintptr_t v, uintptr_t tid);
|
||||
void __mtx_unlock_sleep(volatile uintptr_t *c);
|
||||
#endif
|
||||
|
||||
#ifdef SMP
|
||||
@ -154,9 +153,9 @@ void thread_lock_flags_(struct thread *, int, const char *, int);
|
||||
__mtx_unlock_sleep(&(m)->mtx_lock, o, f, l)
|
||||
#else
|
||||
#define _mtx_lock_sleep(m, v, t, o, f, l) \
|
||||
__mtx_lock_sleep(&(m)->mtx_lock, v, t, o)
|
||||
__mtx_lock_sleep(&(m)->mtx_lock, v, t)
|
||||
#define _mtx_unlock_sleep(m, o, f, l) \
|
||||
__mtx_unlock_sleep(&(m)->mtx_lock, o)
|
||||
__mtx_unlock_sleep(&(m)->mtx_lock)
|
||||
#endif
|
||||
#ifdef SMP
|
||||
#define _mtx_lock_spin(m, v, t, o, f, l) \
|
||||
|
Loading…
x
Reference in New Issue
Block a user