From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by sourceware.org (Postfix) with ESMTP id 9048D385780D for ; Tue, 20 Apr 2021 13:20:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 9048D385780D Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-539-GXJC5LeXN8S8nsjEUdoimA-1; Tue, 20 Apr 2021 09:20:42 -0400 X-MC-Unique: GXJC5LeXN8S8nsjEUdoimA-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id EB92E107ACF6; Tue, 20 Apr 2021 13:20:40 +0000 (UTC) Received: from localhost (unknown [10.33.36.164]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6FAB419726; Tue, 20 Apr 2021 13:20:40 +0000 (UTC) Date: Tue, 20 Apr 2021 14:20:39 +0100 From: Jonathan Wakely To: Thomas Rodgers Cc: gcc-patches@gcc.gnu.org, libstdc++@gcc.gnu.org, trodgers@redhat.com, Thomas Rodgers Subject: Re: [PATCH] [libstdc++] Refactor/cleanup of atomic wait implementation Message-ID: <20210420132039.GI3008@redhat.com> References: <20210415124617.GN3008@redhat.com> <20210419192305.406972-1-rodgert@appliantology.com> <20210420120215.GH3008@redhat.com> MIME-Version: 1.0 In-Reply-To: <20210420120215.GH3008@redhat.com> X-Clacks-Overhead: GNU Terry Pratchett X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline X-Spam-Status: No, score=-8.0 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libstdc++@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libstdc++ mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Apr 2021 13:20:48 -0000 On 20/04/21 13:02 +0100, Jonathan Wakely wrote: >On 19/04/21 12:23 -0700, Thomas Rodgers wrote: >>+ template>+ typename _Spin = __default_spin_policy> >>+ static bool >>+ _S_do_spin_v(__platform_wait_t* __addr, >>+ const _Up& __old, _ValFn __vfn, >>+ __platform_wait_t& __val, >>+ _Spin __spin = _Spin{ }) >>+ { >>+ auto const __pred = [=] >>+ { return __atomic_compare(__old, __vfn()); }; > >This doesn't compile, there are 28 FAILs in 29_atomics/* > >FAIL: 29_atomics/atomic_integral/cons/value_init.cc (test for excess errors) > >It needs to be qualified as __detail::__atomic_compare. Ah no, the problem is that atomic_flag::wait uses it, but it tries to compare a bool to atomic_flag::__atomic_flag_data_type, which isn't the same.