Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 31 Aug 2012 22:30:14 GMT
From:      dfilter@FreeBSD.ORG (dfilter service)
To:        freebsd-threads@FreeBSD.org
Subject:   Re: threads/170073: commit references a PR
Message-ID:  <201208312230.q7VMUEYg082562@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR threads/170073; it has been noted by GNATS.

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: threads/170073: commit references a PR
Date: Fri, 31 Aug 2012 22:22:29 +0000 (UTC)

 Author: ed
 Date: Fri Aug 31 22:22:14 2012
 New Revision: 239960
 URL: http://svn.freebsd.org/changeset/base/239960
 
 Log:
   Properly enable Clang-style atomics when available.
   
   In addition to testing against cxx_atomic, we must check c_atomic. The
   former is only set when building C++ code. Also use __has_extension
   instead of __has_feature. This allows us to use the atomics outside of
   C11.
   
   Reported by:	Ariane van der Steldt <ariane stack nl>
   PR:		threads/170073
 
 Modified:
   head/include/stdatomic.h
 
 Modified: head/include/stdatomic.h
 ==============================================================================
 --- head/include/stdatomic.h	Fri Aug 31 21:45:49 2012	(r239959)
 +++ head/include/stdatomic.h	Fri Aug 31 22:22:14 2012	(r239960)
 @@ -33,7 +33,7 @@
  #include <sys/cdefs.h>
  #include <sys/_types.h>
  
 -#if __has_feature(cxx_atomic)
 +#if __has_extension(c_atomic) || __has_extension(cxx_atomic)
  #define	__CLANG_ATOMICS
  #elif __GNUC_PREREQ__(4, 7)
  #define	__GNUC_ATOMICS
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 



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