From owner-svn-src-all@FreeBSD.ORG Tue Sep 2 11:16:45 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1511359D; Tue, 2 Sep 2014 11:16:45 +0000 (UTC) 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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 00E711111; Tue, 2 Sep 2014 11:16:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s82BGiqF071066; Tue, 2 Sep 2014 11:16:44 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s82BGiXI071065; Tue, 2 Sep 2014 11:16:44 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201409021116.s82BGiXI071065@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Tue, 2 Sep 2014 11:16:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270964 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Sep 2014 11:16:45 -0000 Author: ed Date: Tue Sep 2 11:16:44 2014 New Revision: 270964 URL: http://svnweb.freebsd.org/changeset/base/270964 Log: Clean up slightly. - Remove c++0x hack from that was needed when Clang did not fully implement C++11. We can now safely test against C++11 to check whether thread_local is available, like we do for all other C++11 keywords. - Don't use __clang__ to test for thread safety annotation presence. It turns out we have a proper attribute for this. Modified: head/sys/sys/cdefs.h Modified: head/sys/sys/cdefs.h ============================================================================== --- head/sys/sys/cdefs.h Tue Sep 2 10:35:04 2014 (r270963) +++ head/sys/sys/cdefs.h Tue Sep 2 11:16:44 2014 (r270964) @@ -298,8 +298,7 @@ #endif #if !__has_extension(c_thread_local) -/* XXX: Change this to test against C++11 when clang in base supports it. */ -#if /* (defined(__cplusplus) && __cplusplus >= 201103L) || */ \ +#if (defined(__cplusplus) && __cplusplus >= 201103L) || \ __has_extension(cxx_thread_local) #define _Thread_local thread_local #else @@ -751,7 +750,7 @@ * held. */ -#ifdef __clang__ +#if __has_extension(c_thread_safety_attributes) #define __lock_annotate(x) __attribute__((x)) #else #define __lock_annotate(x)