summaryrefslogtreecommitdiffstats
path: root/sys/sys/cdefs.h
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2014-09-01 18:28:11 +0000
committered <ed@FreeBSD.org>2014-09-01 18:28:11 +0000
commitb51450dbbdf2d19842d1a554666b09373d8912c1 (patch)
tree10e33937155e4c33e148ae7996fde3bb917c5bcc /sys/sys/cdefs.h
parente774df25e5982fe2a482f7242bb04a6ff6c33292 (diff)
downloadFreeBSD-src-b51450dbbdf2d19842d1a554666b09373d8912c1.zip
FreeBSD-src-b51450dbbdf2d19842d1a554666b09373d8912c1.tar.gz
Enable lock annotations on HEAD when using Clang.
MFC after: never
Diffstat (limited to 'sys/sys/cdefs.h')
-rw-r--r--sys/sys/cdefs.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h
index 3f556a5..a8d4baf 100644
--- a/sys/sys/cdefs.h
+++ b/sys/sys/cdefs.h
@@ -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)
OpenPOWER on IntegriCloud