From owner-svn-src-head@FreeBSD.ORG Thu Jan 19 18:30:53 2012 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3B36A106564A; Thu, 19 Jan 2012 18:30:53 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from theravensnest.org (theravensnest.org [109.169.23.128]) by mx1.freebsd.org (Postfix) with ESMTP id C59648FC12; Thu, 19 Jan 2012 18:30:52 +0000 (UTC) Received: from [192.168.0.2] (cpc1-cwma8-2-0-cust257.7-3.cable.virginmedia.com [82.20.153.2]) (authenticated bits=0) by theravensnest.org (8.14.4/8.14.4) with ESMTP id q0JIUlZ7003392 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Thu, 19 Jan 2012 18:30:51 GMT (envelope-from theraven@FreeBSD.org) Mime-Version: 1.0 (Apple Message framework v1251.1) Content-Type: text/plain; charset=us-ascii From: David Chisnall In-Reply-To: <20120119180949.GU95413@hoeg.nl> Date: Thu, 19 Jan 2012 18:30:40 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201201160615.q0G6FE9r019542@svn.freebsd.org> <4F13D43C.2060207@freebsd.org> <4F13D768.10307@gmail.com> <20120119180949.GU95413@hoeg.nl> To: Ed Schouten X-Mailer: Apple Mail (2.1251.1) Cc: svn-src-head@FreeBSD.org, Lawrence Stewart , svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, davidxu@FreeBSD.org Subject: Re: svn commit: r230201 - head/lib/libc/gen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jan 2012 18:30:53 -0000 On 19 Jan 2012, at 18:09, Ed Schouten wrote: > In the very nearby future (after I switch SPARC64 and MIPS to > libcompiler_rt), it should be possible to safely use C11's = > on all supported architectures. The C11 interface allows any operation > to be combined with any type of barrier. >=20 > Maybe we should simply migrate this code to use then? Currently, that will give worse code if we use gcc 4.2.1, but (I hope!) = better code if we use clang. With GCC, we are implementing = atomic_thread_fence() as __sync_synchronize(), which is a full barrier, = and ignoring its argument. It would probably be worth postponing any = such migration until: 1) Clang is the default compiler, and 2) The bugs in LLVM that cause the back end to fatal error on any = nontrivial code using atomics are fixed. David=