From owner-svn-src-stable-9@FreeBSD.ORG Sun Aug 18 08:18:50 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C22A159A; Sun, 18 Aug 2013 08:18:50 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AE4F224C8; Sun, 18 Aug 2013 08:18:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7I8IoIZ041990; Sun, 18 Aug 2013 08:18:50 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7I8Iolw041964; Sun, 18 Aug 2013 08:18:50 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201308180818.r7I8Iolw041964@svn.freebsd.org> From: Ed Maste Date: Sun, 18 Aug 2013 08:18:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r254477 - stable/9/include X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Aug 2013 08:18:50 -0000 Author: emaste Date: Sun Aug 18 08:18:49 2013 New Revision: 254477 URL: http://svnweb.freebsd.org/changeset/base/254477 Log: MFC r239960: 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. PR: threads/170073 Modified: stable/9/include/stdatomic.h Directory Properties: stable/9/include/ (props changed) Modified: stable/9/include/stdatomic.h ============================================================================== --- stable/9/include/stdatomic.h Sun Aug 18 06:08:52 2013 (r254476) +++ stable/9/include/stdatomic.h Sun Aug 18 08:18:49 2013 (r254477) @@ -33,7 +33,7 @@ #include #include -#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