From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 463 invoked by alias); 30 Nov 2012 16:38:41 -0000 Received: (qmail 382 invoked by uid 22791); 30 Nov 2012 16:38:38 -0000 X-SWARE-Spam-Status: No, hits=-6.6 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 30 Nov 2012 16:38:26 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qAUGcPrE027915 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 30 Nov 2012 11:38:25 -0500 Received: from zalov.redhat.com (vpn1-5-70.ams2.redhat.com [10.36.5.70]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id qAUGcNq9032611 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 30 Nov 2012 11:38:25 -0500 Received: from zalov.cz (localhost [127.0.0.1]) by zalov.redhat.com (8.14.5/8.14.5) with ESMTP id qAUGcM3D027017; Fri, 30 Nov 2012 17:38:22 +0100 Received: (from jakub@localhost) by zalov.cz (8.14.5/8.14.5/Submit) id qAUGcMML027016; Fri, 30 Nov 2012 17:38:22 +0100 Date: Fri, 30 Nov 2012 16:42:00 -0000 From: Jakub Jelinek To: Dmitry Vyukov Cc: Kostya Serebryany , Dodji Seketeli , GCC Patches Subject: Re: [tsan] Instrument atomics Message-ID: <20121130163822.GI2315@tucnak.redhat.com> Reply-To: Jakub Jelinek References: <20121123140538.GX2315@tucnak.redhat.com> <20121127082330.GS2315@tucnak.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes 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: 2012-11/txt/msg02560.txt.bz2 On Tue, Nov 27, 2012 at 12:47:50PM +0400, Dmitry Vyukov wrote: > Yes, you are right. > I think I've done them atomically initially because of things like > FUTEX_WAKE_OP. I will fix that. Any progress on that? BTW, the current template T func_nand(T v, T op) { return ~v & op; } is wrong not just by not being atomic (similarly to others), but furthermore because __sync_fetch_and_nand (and __atomic etc.) are return ~(v & op); instead (GCC < 4.4 did it wrongly as ~v & op; though). Jakub