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.129.124]) by sourceware.org (Postfix) with ESMTPS id 1F0603858C5E for ; Fri, 10 Mar 2023 02:39:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1F0603858C5E 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=1678415985; 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=dR+7usmjQFg5vsZ5TND3/9kDT2F4K3rsXBh+wvBP8/Y=; b=NZbisMVLHi+bMbx50OaW4PvR+EAuodhaCYc67ZODxcpx0l7iNSTFox+WViXrsDgkGLWL1s 1J3fyQ2TxTq58UgovPjUlmxthNY+1mr8UlXBNJ7I10khE6dYerGnRUyXDDdeftBd91lAZO yRszD3Jj523V3oCJaAwCKlBHM4gVq6c= Received: from mail-pl1-f199.google.com (mail-pl1-f199.google.com [209.85.214.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-363-w-AsunznNrSwEovKfismwQ-1; Thu, 09 Mar 2023 21:39:44 -0500 X-MC-Unique: w-AsunznNrSwEovKfismwQ-1 Received: by mail-pl1-f199.google.com with SMTP id lm13-20020a170903298d00b0019a8c8a13dfso2033881plb.16 for ; Thu, 09 Mar 2023 18:39:44 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678415983; 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=dR+7usmjQFg5vsZ5TND3/9kDT2F4K3rsXBh+wvBP8/Y=; b=F2HPOKx7n7vDlrk9XZilXFvLJQLp77LqXDN/dZzdlxHv8cjqKWpb4OBvII2NKXlsme +m9HacSoyWhFIn32TcmySiSqOMuPO7aGMI6v7vbcWZzwYBSyQpMRnx6LMeIwTCCE8fRb 4MoBYfNmAZeiFtV3si9hbgfDwKySWxqKH8fjYQrAFS8FJof29B18c6O2a1zuVVnGHmIx IvPDlAoeBuT7AWQLURXajpG3GgF9oCzoU9nRYaHFW7ua/jZ1/X4OiJljtB5WUzFS6DXW o51lhEPbgWpvQ0hagxgdMCQHmrivjqwtGIcNmvDAv5wibVeocIwlpS3K3e/4cWxRxrcg GA1w== X-Gm-Message-State: AO0yUKXqOWrixGtB2u7QQsw8OmZGixTzgZgg72VI4mbG/MI4feRM9wlP bUsVgp8sBW8WmssbDVsZ5Ym0vl4gaMDZQ5jNazK3Fw8+FtvkaxtSnifcmk3u8V/ObtlJZN15ctu +mFJlQ/mwmDfPSPbcDrVFOlScbRKrzIM= X-Received: by 2002:a62:8643:0:b0:590:3182:9339 with SMTP id x64-20020a628643000000b0059031829339mr9825891pfd.0.1678415983327; Thu, 09 Mar 2023 18:39:43 -0800 (PST) X-Google-Smtp-Source: AK7set+ipuGQi08IApqFLHvsbMDf9HFluMWEU3F2K85DFi/rCBSNuHl2KcJrbgNXRNCeRDeZgw9Z7p0SvzMV6+Ldo0U= X-Received: by 2002:a62:8643:0:b0:590:3182:9339 with SMTP id x64-20020a628643000000b0059031829339mr9825885pfd.0.1678415982769; Thu, 09 Mar 2023 18:39:42 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Thomas Rodgers Date: Thu, 9 Mar 2023 18:39:31 -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="0000000000007056d305f682ac22" X-Spam-Status: No, score=-5.1 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=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --0000000000007056d305f682ac22 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable The second patch has now been backported and pushed to releases/gcc-12 and releases/gcc-11. On Mon, Feb 13, 2023 at 6:06=E2=80=AFPM Thomas Rodgers wrote: > 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. >> >> >> >> --0000000000007056d305f682ac22--