linuxkpi: Define lockdep_assert{,_once}()
Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D38538
This commit is contained in:
parent
54606590df
commit
b82bcfb66f
@ -52,6 +52,9 @@ struct pin_cookie {
|
||||
#define lockdep_unregister_key(key) do { } while(0)
|
||||
|
||||
#ifdef INVARIANTS
|
||||
#define lockdep_assert(cond) do { WARN_ON(!cond); } while (0)
|
||||
#define lockdep_assert_once(cond) do { WARN_ON_ONCE(!cond); } while (0)
|
||||
|
||||
#define lockdep_assert_not_held(m) do { \
|
||||
struct lock_object *__lock = (struct lock_object *)(m); \
|
||||
LOCK_CLASS(__lock)->lc_assert(__lock, LA_UNLOCKED); \
|
||||
@ -81,6 +84,9 @@ lockdep_is_held(void *__m)
|
||||
#define lockdep_is_held_type(_m, _t) lockdep_is_held(_m)
|
||||
|
||||
#else
|
||||
#define lockdep_assert(cond) do { } while (0)
|
||||
#define lockdep_assert_once(cond) do { } while (0)
|
||||
|
||||
#define lockdep_assert_not_held(m) do { (void)(m); } while (0)
|
||||
#define lockdep_assert_held(m) do { (void)(m); } while (0)
|
||||
#define lockdep_assert_none_held_once() do { } while (0)
|
||||
|
Loading…
Reference in New Issue
Block a user