Add a couple of macros to lockdep.h in the LinuxKPI.

MFC after:	1 week
This commit is contained in:
markj 2017-06-25 19:23:14 +00:00
parent 9575bf4b0e
commit 7ab36912bc

View File

@ -39,7 +39,12 @@ struct lock_class_key {
#define lockdep_set_class_and_name(lock, key, name)
#define lockdep_assert_held(m) \
sx_assert(&(m)->sx, SA_XLOCKED)
#define lockdep_assert_held_once(m) \
sx_assert(&(m)->sx, SA_XLOCKED | SA_NOTRECURSED)
#define lockdep_is_held(m) (sx_xholder(&(m)->sx) == curthread)
#endif /* _LINUX_LOCKDEP_H_ */