Make inp_lock_assert() depend on INVARIANT_SUPPORT, not INVARIANTS.

This will make INVARIANT-enabled modules, that use this function to load
successfully on a kernel that has INVARIANT_SUPPORT only.
This commit is contained in:
Gleb Smirnoff 2017-03-09 00:55:19 +00:00
parent a344babf78
commit c75e266608
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=314930
2 changed files with 4 additions and 12 deletions

View File

@ -2348,7 +2348,7 @@ inp_runlock(struct inpcb *inp)
INP_RUNLOCK(inp);
}
#ifdef INVARIANTS
#ifdef INVARIANT_SUPPORT
void
inp_lock_assert(struct inpcb *inp)
{

View File

@ -464,20 +464,12 @@ void inp_wunlock(struct inpcb *);
void inp_rlock(struct inpcb *);
void inp_runlock(struct inpcb *);
#ifdef INVARIANTS
#ifdef INVARIANT_SUPPORT
void inp_lock_assert(struct inpcb *);
void inp_unlock_assert(struct inpcb *);
#else
static __inline void
inp_lock_assert(struct inpcb *inp __unused)
{
}
static __inline void
inp_unlock_assert(struct inpcb *inp __unused)
{
}
#define inp_lock_assert(inp) do {} while (0)
#define inp_unlock_assert(inp) do {} while (0)
#endif
void inp_apply_all(void (*func)(struct inpcb *, void *), void *arg);