Author: ed
Date: Sun Jun  9 08:28:23 2013
New Revision: 251566
URL: http://svnweb.freebsd.org/changeset/base/251566

Log:
  Fix the way atomic_is_lock_free() is defined for Clang.
  
  When using Clang atomics, atomic types are not placed in a structure.
  There is thus no reason why we should get the __val member.

Modified:
  head/sys/sys/stdatomic.h

Modified: head/sys/sys/stdatomic.h
==============================================================================
--- head/sys/sys/stdatomic.h    Sun Jun  9 08:06:26 2013        (r251565)
+++ head/sys/sys/stdatomic.h    Sun Jun  9 08:28:23 2013        (r251566)
@@ -156,7 +156,10 @@ enum memory_order {
  * 7.17.5 Lock-free property.
  */
 
-#if defined(__CLANG_ATOMICS) || defined(__GNUC_ATOMICS)
+#if defined(__CLANG_ATOMICS)
+#define        atomic_is_lock_free(obj) \
+       __atomic_is_lock_free(sizeof(*(obj)), obj)
+#elif defined(__GNUC_ATOMICS)
 #define        atomic_is_lock_free(obj) \
        __atomic_is_lock_free(sizeof((obj)->__val), &(obj)->__val)
 #else
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to