Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Jun 2017 18:08:36 +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: r320192 - head/sys/compat/linuxkpi/common/include/linux
Message-ID:  <201706211808.v5LI8aEa057555@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: markj
Date: Wed Jun 21 18:08:36 2017
New Revision: 320192
URL: https://svnweb.freebsd.org/changeset/base/320192

Log:
  Add a lockdep macro to the LinuxKPI.
  
  Also fix some nearby style issues.
  
  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	Wed Jun 21 17:11:49 2017	(r320191)
+++ head/sys/compat/linuxkpi/common/include/linux/lockdep.h	Wed Jun 21 18:08:36 2017	(r320192)
@@ -28,14 +28,18 @@
  *
  * $FreeBSD$
  */
-#ifndef	_LINUX_LOCKDEP_H_
+
+#ifndef _LINUX_LOCKDEP_H_
 #define	_LINUX_LOCKDEP_H_
 
 struct lock_class_key {
 };
 
-#define lockdep_set_class(lock, key)
+#define	lockdep_set_class(lock, key)
 
-#define lockdep_set_class_and_name(lock, key, name)
+#define	lockdep_set_class_and_name(lock, key, name)
 
-#endif  /* _LINUX_LOCKDEP_H_ */
+#define	lockdep_assert_held_once(m)			\
+	sx_assert(&(m)->sx, SA_XLOCKED | SA_NOTRECURSED)
+
+#endif /* _LINUX_LOCKDEP_H_ */



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