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 [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 0B36B3858C50 for ; Sat, 11 Feb 2023 00:57:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0B36B3858C50 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1676077032; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=h2hB5u9lHrPHCIre0m+xl5plsW+YZEUgnQG35kqUXiY=; b=QpXnHMANPQRbQW3MWcY12KnavLyAT/s8FU2W6uEk1yi+gTlfo1nafuyh0A+8encfWY6H+z 5CTtImrQ0INnc9XUzU7UsMewE97kAFjTCo5kJ783UfkPLrPC8DcgOBRnUxtbPHg2NWldQ3 tjZC+CPRPlYfaDqnPiVLr3gKwUJCYxk= Received: from mail-lf1-f70.google.com (mail-lf1-f70.google.com [209.85.167.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-344-UIpqXMOdMQ2vFJDNEm1YSQ-1; Fri, 10 Feb 2023 19:41:50 -0500 X-MC-Unique: UIpqXMOdMQ2vFJDNEm1YSQ-1 Received: by mail-lf1-f70.google.com with SMTP id g27-20020a0565123b9b00b004d861df2daeso2913523lfv.13 for ; Fri, 10 Feb 2023 16:41:49 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=h2hB5u9lHrPHCIre0m+xl5plsW+YZEUgnQG35kqUXiY=; b=YZKBtpmnlZGLf6fJ8yWBbpn8IZTlvQ/CR3AItXEW/oWW31AnRiB6RRwBlqZsT7Dvqj QjGDLVh/smbhA6jm2uOEPnXqNzaLHMIaRTA4x+7+U/TrYJOFfRJnqcr0ac9ZWW42/4AE WyXumhQp+OJKn8Iigyee03hAkF+Aa3OKVPjM8zdsp6wNIW1bsq5w8NYt/fXng0ITVWCr 4jDk+hd4zL0DtT1eoPrE8HPEietlfFoS3I/9A9h1iIpicCuaQj6t4QLxnaQcbfs1i1ar KuLp5ixx7YzE7FDzWpdMp6DBsDRXrfClp0LO6A6hLg2A6ihp7uiqukD4+cSp1LWEEzGj Fl6g== X-Gm-Message-State: AO0yUKVlTJ87YLNztjfEDNkqdbhS61jKu+lVha2lTOxVG9XJ2RZlGa9D dT42ynPfJTjjQLmi6ugsQxVp7QoEIn4D5cKDHPt7zo16tCLqvBGzO1JqRM+RducxT4PG0OLuSl6 OL9MN/j7BTc7SOVF5nbPsRZcYqZVxKWZ1dA== X-Received: by 2002:a05:6512:38c7:b0:4cb:3ef3:173e with SMTP id p7-20020a05651238c700b004cb3ef3173emr2979921lft.231.1676076108639; Fri, 10 Feb 2023 16:41:48 -0800 (PST) X-Google-Smtp-Source: AK7set9matODXi4iOI77xsPT6qxdvwyPg53yPVM8q9DxlbHur6ESxCzi/sStJaZv10wjZoLLMrAt8O9klJG1kAg/VjM= X-Received: by 2002:a05:6512:38c7:b0:4cb:3ef3:173e with SMTP id p7-20020a05651238c700b004cb3ef3173emr2979895lft.231.1676076103371; Fri, 10 Feb 2023 16:41:43 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Jonathan Wakely Date: Sat, 11 Feb 2023 00:41:32 +0000 Message-ID: Subject: Re: [PATCH] libstdc++: Add missing free functions for atomic_flag [PR103934] To: Thomas Rodgers Cc: "libstdc++" , gcc Patches X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-6.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Fri, 10 Feb 2023 at 18:25, Thomas Rodgers wrote: > > This patch did not get committed in a timely manner after it was OK'd. In revisiting the patch some issues were found that have lead me to resubmit for review - > > Specifically - > > The original commit to add C++20 atomic_flag::test did not include the free functions for atomic_flag_test[_explicit] > The original commit to add C++20 atomic_flag::wait/notify did not include the free functions for atomic_flag_wait/notify[_explicit] > > These two commits landed in GCC10 and GCC11 respectively. My original patch included both sets of free functions, but > that complicates the backporting of these changes to GCC10, GCC11, and GCC12. I don't think we need them in GCC 10. > Additionally commit 7c2155 removed const qualification from atomic_flag::notify_one/notify_all but the original version of this > patch accepts the atomic flag as const. > > The original version of this patch did not include test cases for the atomic_flag_test[_explicit] free functions. > > I have split the original patch into two patches, on for the atomic_flag_test free functions, and one for the atomic_flag_wait/notify > free functions. Thanks. For [PATCH 1/2] please name the added functions in the changelog entry: * include/std/atomic (atomic_flag_test): Add. (atomic_flag_test_explicit): Add. Similarly for the changelog in [PATCH 2/2], naming the four new functions added to include/std/atomic. The indentation is off in [PATCH 2/2] for atomic_flag: +#if __cpp_lib_atomic_wait + inline void + atomic_flag_wait(atomic_flag* __a, bool __old) noexcept + { __a->wait(__old); } + And similarly for the other three added functions. The function names should start in the same column as the 'inline' and opening brace of the function body. Both patches are OK for trunk, gcc-12 and gcc-11 with those changes. > > > On Wed, Feb 2, 2022 at 1:35 PM Jonathan Wakely wrote: >> >> >+ inline void >> >+ atomic_flag_wait_explicit(const atomic_flag* __a, bool __old, >> >+ std::memory_order __m) noexcept >> >> No need for the std:: qualification, and check the indentation. >> >> >> > libstdc++-v3/ChangeLog: >> > >> > PR103934 >> >> This needs to include the component: PR libstdc++/103934 >> >> > * include/std/atomic: Add missing free functions. >> >> Please name the new functions in the changelog, in the usual format. >> Just the names is fine, no need for the full signatures with >> parameters. >> >> OK for trunk with those changes. >>