Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 25 Jun 2017 19:23:14 +0000 (UTC)
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r320335 - head/sys/compat/linuxkpi/common/include/linux
Message-ID:  <201706251923.v5PJNEkR072061@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: markj
Date: Sun Jun 25 19:23:14 2017
New Revision: 320335
URL: https://svnweb.freebsd.org/changeset/base/320335

Log:
  Add a couple of macros to lockdep.h in the LinuxKPI.
  
  MFC after:	1 week

Modified:
  head/sys/compat/linuxkpi/common/include/linux/lockdep.h

Modified: head/sys/compat/linuxkpi/common/include/linux/lockdep.h
==============================================================================
--- head/sys/compat/linuxkpi/common/include/linux/lockdep.h	Sun Jun 25 19:21:59 2017	(r320334)
+++ head/sys/compat/linuxkpi/common/include/linux/lockdep.h	Sun Jun 25 19:23:14 2017	(r320335)
@@ -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_ */



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