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 4AB1D3858C50 for ; Sat, 11 Feb 2023 00:41:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4AB1D3858C50 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=1676076115; 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=bMKp+/wElgndxStJucMu3NarsJjQPYpL7UerlDgGTB1BM0nhNHhZQUKhC4U1sqNT3DgYbL UrsQX9GQ9XqS8KXzbj6t2D4lr19s/DW/YzLzjELH4pDd+SBZYe1lU+NqFBLTVj6K7aD0aK F7IZeaFWduYoreNaxJ4RO1kjJyyUx3Q= 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-332-vwyWs-PCNOGqwB19KFNBCQ-1; Fri, 10 Feb 2023 19:41:49 -0500 X-MC-Unique: vwyWs-PCNOGqwB19KFNBCQ-1 Received: by mail-lf1-f70.google.com with SMTP id d2-20020a0565123d0200b004d1b23f2047so2942149lfv.20 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=z9sGUF0/iwo+WsI3j+kqfB2Vx8DbqNeOe611EvPRDGkL75RL4O8pvfkzvm0aiM/8nj xwIcok8tfo1++qnwM6SzKw8CacXr6/p2E/YVkJ9O6w6Yclhq/RekOf2BOdVhFz8V0Aa4 gxWrLT2nHkQuC4xspcK56m+PmbRpSQnyNeGwilpl7LIU8b/HyWuyE/wMOQlrzCWU+1vM a5fBSARZHfhPbWcbGprkaL/nSysi+eNXtNkySRE9M1gERGqU4p5qqBsqPKOH6CwGYadk xBUtsTt8zV0j+zX9F0pcCCbahf2ybc3elnF7SvqlmdOS8C/XQY6+3m1un0JR4JH+Ilw7 4PdA== X-Gm-Message-State: AO0yUKWC4wSdl3XaGxwNi+wTytLIabN+me7jPF/qQpRN/3YIUbHzl6ou Lo3xir29XTAYpmOUGlKA/n1P5zZT0SUbSM5piqEXkWb2iBwMVmPjUfhiLysv9QiDGTIn+wWl0jt 9E61G3iK38bxd4aD/XpE2OTKWM09QIMc= X-Received: by 2002:a05:6512:38c7:b0:4cb:3ef3:173e with SMTP id p7-20020a05651238c700b004cb3ef3173emr2979920lft.231.1676076108495; 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.2 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=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: 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. >>