Implement more lockdep macros in the LinuxKPI.

Submitted by:	ashafer_badland.io (Austin Shafer)
MFC after:	1 week
Sponsored by:	Mellanox Technologies
This commit is contained in:
Hans Petter Selasky 2020-05-01 10:18:07 +00:00
parent 61f7fe6b2d
commit 922106bf00

View File

@ -36,6 +36,7 @@ struct lock_class_key {
};
#define lockdep_set_class(lock, key)
#define lockdep_set_subclass(lock, sub)
#define lockdep_set_class_and_name(lock, key, name)
#define lockdep_set_current_reclaim_state(g) do { } while (0)
#define lockdep_clear_current_reclaim_state() do { } while (0)
@ -60,6 +61,7 @@ lockdep_is_held(void *__m)
__lock = __m;
return (LOCK_CLASS(__lock)->lc_owner(__lock, &__td) != 0);
}
#define lockdep_is_held_type(_m, _t) lockdep_is_held(_m)
#else
#define lockdep_assert_held(m) do { } while (0)
@ -67,6 +69,7 @@ lockdep_is_held(void *__m)
#define lockdep_assert_held_once(m) do { } while (0)
#define lockdep_is_held(m) 1
#define lockdep_is_held_type(_m, _t) 1
#endif
#define might_lock(m) do { } while (0)
@ -76,4 +79,7 @@ lockdep_is_held(void *__m)
#define lock_release(...) do { } while (0)
#define lock_acquire_shared_recursive(...) do { } while (0)
#define mutex_acquire(...) do { } while (0)
#define mutex_release(...) do { } while (0)
#endif /* _LINUX_LOCKDEP_H_ */