Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 1 Sep 2014 18:28:12 +0000 (UTC)
From:      Ed Schouten <ed@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r270942 - head/sys/sys
Message-ID:  <201409011828.s81ISCF6082142@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ed
Date: Mon Sep  1 18:28:11 2014
New Revision: 270942
URL: http://svnweb.freebsd.org/changeset/base/270942

Log:
  Enable lock annotations on HEAD when using Clang.
  
  MFC after:	never

Modified:
  head/sys/sys/cdefs.h

Modified: head/sys/sys/cdefs.h
==============================================================================
--- head/sys/sys/cdefs.h	Mon Sep  1 18:27:04 2014	(r270941)
+++ head/sys/sys/cdefs.h	Mon Sep  1 18:28:11 2014	(r270942)
@@ -749,12 +749,13 @@
  * Furthermore, it is also possible to annotate variables and structure
  * members to enforce that they are only accessed when certain locks are
  * held.
- *
- * Note: These annotations have no effect on this version of FreeBSD.
- * They are merely provided for forward compatibilty.
  */
 
+#ifdef __clang__
+#define	__lock_annotate(x)	__attribute__((x))
+#else
 #define	__lock_annotate(x)
+#endif
 
 /* Structure implements a lock. */
 #define	__lockable		__lock_annotate(lockable)



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