From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29425 invoked by alias); 7 Nov 2011 16:24:26 -0000 Received: (qmail 29406 invoked by uid 22791); 7 Nov 2011 16:24:22 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,TW_CX X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 07 Nov 2011 16:24:09 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=EU1-MAIL.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1RNRzT-0004Nn-4o from joseph_myers@mentor.com ; Mon, 07 Nov 2011 08:24:07 -0800 Received: from digraph.polyomino.org.uk ([172.16.63.104]) by EU1-MAIL.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.1830); Mon, 7 Nov 2011 16:24:05 +0000 Received: from jsm28 (helo=localhost) by digraph.polyomino.org.uk with local-esmtp (Exim 4.74) (envelope-from ) id 1RNRzQ-00078s-6i; Mon, 07 Nov 2011 16:24:04 +0000 Date: Mon, 07 Nov 2011 16:28:00 -0000 From: "Joseph S. Myers" To: Andrew MacLeod cc: Hans-Peter Nilsson , hp@axis.com, gcc-patches@gcc.gnu.org, libstdc++@gcc.gnu.org, Benjamin Kosnik , Richard Henderson Subject: Re: cxx-mem-model merge [6 of 9] - libstdc++-v3 In-Reply-To: <4EB7EEDF.1040103@redhat.com> Message-ID: References: <201111071117.pA7BHERD007071@ignucius.se.axis.com> <4EB7EEDF.1040103@redhat.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2011-11/txt/msg00987.txt.bz2 On Mon, 7 Nov 2011, Andrew MacLeod wrote: > Actually, this target has no lock free support whatsoever? ie, no > compare_and_swap instruction, nor an implementation of sync_lock_test_and_set > and sync_lock_release? > > I think the libstdc++ standard now requires the class atomic_flag to be lock > free in order to conform (n3242 29.7.2) > > So I guess this is the situation which all the atomic tests are not even > suppose to be run since they aren't supported. My guess is that in the > previous releases the c++ header files probably provided a locked > implementation of test_and_set, and so the tests would run. For bare-metal targets there should maybe be an option to presume there is just one thread and map all atomic operations to dumb non-atomic versions, which is perfectly valid in such a case. But that's a new feature; we didn't have it for __sync_* either. -- Joseph S. Myers joseph@codesourcery.com