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 52AAC3858D20 for ; Tue, 14 Feb 2023 02:06:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 52AAC3858D20 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=1676340386; 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=5LSrz8Ces3g/KwXlIX+YVjgrigHsW9k2UhgZuH0pFu8=; b=U5NMFIHx/Pm0OJcKtAn9p0hEPJfM2bkcXUbdLFm4La9jmfkZDn1ljg7jDnLyP8S9PO557Y RfsiW+Jy/OmK7U4bB3kUHGxVwFNrU28nr0tqOfH33nrQVqPeP/6FfPLse40FYU49NI0eJC c4/3myYTk3FBjTjWewEGT8G4Rsec3xE= Received: from mail-pf1-f197.google.com (mail-pf1-f197.google.com [209.85.210.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-662-wZcaENdnMNC39cUzr0XyHg-1; Mon, 13 Feb 2023 21:06:23 -0500 X-MC-Unique: wZcaENdnMNC39cUzr0XyHg-1 Received: by mail-pf1-f197.google.com with SMTP id g14-20020a056a001a0e00b005a8b6d0006eso2436792pfv.11 for ; Mon, 13 Feb 2023 18:06:23 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1676340382; 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=5LSrz8Ces3g/KwXlIX+YVjgrigHsW9k2UhgZuH0pFu8=; b=xGJweqVBKKrpfjxSOyMl4qfSUHOtYzvVnz9smiNRQnqYDgSec6IblwAd2OzX7xxl6E cYTy2IAK9zSJpVr8XGO7VGGHGDdl79MQ7aTNfSZeV/wAj7yjusmm+zgsP/dgOBSx8Rk0 2/JEdGCWR8Q7lk9IBWvqb3aSl2SOBwprPng4ZBnksdp7hM1eyPy5c8vEhlwdvpI2GkDN cZhiXzrY7VwIxATUA1ACs2Kd3Rk5/v6qGqtMGMuT3L2fjbkiSrFii2NB/8XW/bVCWYm/ F0MUxmQZNnJB8LEUM1R9Xcrjfki40PLO/JFOdzV2AhZeBT+FowS3OhvkiHGBYmHGOOTt O2rQ== X-Gm-Message-State: AO0yUKXDPffR0F2gCIGrVd7qX642vMchgXiQQnAgPDhoTp9WwdYSq3BC lwaPDL0LFKTKGtFp16KlrrBU/nCdqAfLxXfUD6mJLGfqSoYcQvG0TekL6kScNFdfCaVRw7Bwzsf BuY4vURHMRl0VY5BIWvUamYhNZmvZoS2EHQ== X-Received: by 2002:aa7:9906:0:b0:5a8:bd48:6dde with SMTP id z6-20020aa79906000000b005a8bd486ddemr120723pff.31.1676340382247; Mon, 13 Feb 2023 18:06:22 -0800 (PST) X-Google-Smtp-Source: AK7set/9xFRmGcqI8fx7hkc9lPQmrbcAms40JXM1QnKTEer2tFfHd9qNGXziEByRvPQ6jxr+60Scx8YeSrJ/fs9KhIM= X-Received: by 2002:aa7:9906:0:b0:5a8:bd48:6dde with SMTP id z6-20020aa79906000000b005a8bd486ddemr120719pff.31.1676340381921; Mon, 13 Feb 2023 18:06:21 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Thomas Rodgers Date: Mon, 13 Feb 2023 18:06:11 -0800 Message-ID: Subject: Re: [PATCH] libstdc++: Add missing free functions for atomic_flag [PR103934] To: Jonathan Wakely Cc: "libstdc++" , gcc Patches X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: multipart/alternative; boundary="000000000000fcc5b705f49f683d" X-Spam-Status: No, score=-5.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,HTML_MESSAGE,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: --000000000000fcc5b705f49f683d Content-Type: text/plain; charset="UTF-8" Tested x86_64-pc-linux-gnu. Pushed to trunk. The first patch has also been backported and pushed to releases/gcc-12 and releases/gcc-11 The second patch fails to cleanly cherry-pick. Will resolve and push shortly. On Fri, Feb 10, 2023 at 4:41 PM Jonathan Wakely wrote: > 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. > >> > > --000000000000fcc5b705f49f683d--