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 2CD083858D28 for ; Wed, 24 Nov 2021 01:27:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 2CD083858D28 Received: from mail-il1-f199.google.com (mail-il1-f199.google.com [209.85.166.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-590-F0_zzAAkPhOAinoO4UmPmw-1; Tue, 23 Nov 2021 20:27:27 -0500 X-MC-Unique: F0_zzAAkPhOAinoO4UmPmw-1 Received: by mail-il1-f199.google.com with SMTP id y3-20020a056e021be300b0029f6c440695so578502ilv.19 for ; Tue, 23 Nov 2021 17:27:27 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=4cZrYm4kSmOrD4UvOlmqds8ZNeOS0RNtoSK4NTYlPRo=; b=Fu7rDsvcjlY3YdOlOdHeBiJJTT4mY4wWLmOCfvGZHBwXGsrmRnd1fS3QMJ4/83NVWA 2KeNYGMImT0PL8INQFpr4rlyOfyn6ay36qdpmVggVrkBZ5YTmyOTFJncX6yQ9w902QCv eY/V3tjQ5ey20j/RsN0uZKAFfwMWLiJpA65/Wr59FxE7lVjpuhfzD3ZDJxveKUOwcqPI uxVKYDAVsJzpxGfECqIWtuQihkGP/kgu1fkx5saFtpwLXuztcVwNnZWWSE7VoN8vn+h1 j3Elqh6J2JVYjtwyz4xKrorlmvtJuQ+MM6Hdt7+KrFvE4xVctVYp7iwVE+Py/hilX4/k Z/Pg== X-Gm-Message-State: AOAM532qsQ/dHTVujFBW2axI98z5Q5JsPbgilvuwyz4NhrRep+5NQbrf ZmZepGvJKbLruAmMJZxOsg5Ej2mHf5h5lFktCFpgSec2yzE01+19JNnDpF/DvXEdw571LEdN80W EGACIdx9TJyur7tUXFAtAN+DZ5lXVOpw= X-Received: by 2002:a05:6e02:1e0b:: with SMTP id g11mr9837598ila.80.1637717246960; Tue, 23 Nov 2021 17:27:26 -0800 (PST) X-Google-Smtp-Source: ABdhPJyVBZJdOmnTyHL/0DmRPYHhzl5bC+Pd/19yIhodwH+adAijoP2oYeD5yUJrG+6XRd5qj4FDHTVzWVU/6tHDJUQ= X-Received: by 2002:a05:6e02:1e0b:: with SMTP id g11mr9837579ila.80.1637717246714; Tue, 23 Nov 2021 17:27:26 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Thomas Rodgers Date: Tue, 23 Nov 2021 17:27:15 -0800 Message-ID: Subject: Re: libstdc++: Make atomic::wait() const [PR102994] To: Jonathan Wakely Cc: "libstdc++" , gcc Patches X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: multipart/mixed; boundary="000000000000bbec5105d17ec25f" X-Spam-Status: No, score=-14.2 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, HTML_MESSAGE, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP, URI_HEX autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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: Wed, 24 Nov 2021 01:27:31 -0000 --000000000000bbec5105d17ec25f Content-Type: text/plain; charset="UTF-8" const qualification was also missing in the free functions for wait/wait_explicit/notify_one/notify_all. Revised patch attached. On Tue, Nov 9, 2021 at 11:40 AM Jonathan Wakely wrote: > On Tue, 9 Nov 2021 at 18:09, Thomas Rodgers wrote: > >> Revised patch attached. >> > > OK for trunk and gcc-11, thanks. > > > >> On Fri, Nov 5, 2021 at 4:46 PM Jonathan Wakely >> wrote: >> >>> On Fri, 5 Nov 2021 at 21:51, Jonathan Wakely via Libstdc++ >>> wrote: >>> > >>> > OK, thanks. >>> >>> Actually, we should really have a test to verify it can be called on a >>> const object. Please add something when you commit, it can be dumb and >>> simple, it just needs to verify that it can be called. >>> >>> >>> > >>> > >>> > On Fri, 5 Nov 2021 at 21:46, Thomas Rodgers via Libstdc++ < >>> > libstdc++@gcc.gnu.org> wrote: >>> > >>> > > >>> > > >>> >>> --000000000000bbec5105d17ec25f Content-Type: text/x-patch; charset="US-ASCII"; name="0001-libstdc-Make-atomic-T-wait-const-PR102994.patch" Content-Disposition: attachment; filename="0001-libstdc-Make-atomic-T-wait-const-PR102994.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_kwcujbkd0 RnJvbSAzMzdjMTQ3YjViYjAyNjU1MjJkNWFhYzRiZWVmYjNkZWMxZWJlMDI2IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBUaG9tYXMgUm9kZ2VycyA8cm9kZ2VydEB0d3JvZGdlcnMuY29t PgpEYXRlOiBUdWUsIDkgTm92IDIwMjEgMDk6NDI6NDkgLTA4MDAKU3ViamVjdDogW1BBVENIXSBs aWJzdGRjKys6IE1ha2UgYXRvbWljPFQqPjo6d2FpdCgpIGNvbnN0IFtQUjEwMjk5NF0KClRoaXMg d2FzIGFuIG92ZXJzaWdodCBpbiB0aGUgb3JpZ2luYWwgY29tbWl0IGFkZGluZyB3YWl0L25vdGlm eQp0byBhdG9taWM8VD4uCgpsaWJzdGRjKystdjMvQ2hhbmdlTG9nOgoKCVBSIGxpYnN0ZGMrKy8x MDI5OTQKCSogaW5jbHVkZS9iaXRzL2F0b21pY19iYXNlLmggKF9f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