linuxkpi: Define lockdep_assert_none_held_once()

This is defined as a no-op even when INVARIANTS is defined. I admit I
don't know how to implement that in FreeBSD and didn't search
thoroughly.

Reviewed by:	bz
Approved by:	bz
Differential Revision:	https://reviews.freebsd.org/D37911
This commit is contained in:
Jean-Sébastien Pédron 2022-12-30 10:50:02 +01:00
parent 8dfb5571c4
commit 17f2b12a38
No known key found for this signature in database
GPG Key ID: 39E99761A5FD94CC

View File

@ -67,6 +67,8 @@ struct pin_cookie {
LOCK_CLASS(__lock)->lc_assert(__lock, LA_LOCKED | LA_NOTRECURSED); \
} while (0)
#define lockdep_assert_none_held_once() do { } while (0)
static __inline bool
lockdep_is_held(void *__m)
{
@ -81,6 +83,7 @@ lockdep_is_held(void *__m)
#else
#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)
#define lockdep_assert_held_once(m) do { (void)(m); } while (0)