Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Feb 2023 21:09:51 GMT
From:      =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= <dumbbell@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: b82bcfb66fa5 - main - linuxkpi: Define `lockdep_assert{,_once}()`
Message-ID:  <202302132109.31DL9pPT056474@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by dumbbell (ports committer):

URL: https://cgit.FreeBSD.org/src/commit/?id=b82bcfb66fa5ef30939f3f5169a07bf4bc139e71

commit b82bcfb66fa5ef30939f3f5169a07bf4bc139e71
Author:     Jean-Sébastien Pédron <dumbbell@FreeBSD.org>
AuthorDate: 2023-02-09 22:04:26 +0000
Commit:     Jean-Sébastien Pédron <dumbbell@FreeBSD.org>
CommitDate: 2023-02-13 21:09:32 +0000

    linuxkpi: Define `lockdep_assert{,_once}()`
    
    Reviewed by:    manu
    Approved by:    manu
    Differential Revision:  https://reviews.freebsd.org/D38538
---
 sys/compat/linuxkpi/common/include/linux/lockdep.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/sys/compat/linuxkpi/common/include/linux/lockdep.h b/sys/compat/linuxkpi/common/include/linux/lockdep.h
index 1f68d6fbc22d..97991c4e598a 100644
--- a/sys/compat/linuxkpi/common/include/linux/lockdep.h
+++ b/sys/compat/linuxkpi/common/include/linux/lockdep.h
@@ -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)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202302132109.31DL9pPT056474>