| Message ID | 20250110212810.832494-1-jwakely@redhat.com |
|---|---|
| Headers |
Return-Path: <gcc-patches-bounces~patchwork=sourceware.org@gcc.gnu.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B14413857C68 for <patchwork@sourceware.org>; Fri, 10 Jan 2025 21:33:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B14413857C68 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=I49l/MXz X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTP id 68C4B3858C35 for <gcc-patches@gcc.gnu.org>; Fri, 10 Jan 2025 21:28:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 68C4B3858C35 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 68C4B3858C35 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1736544498; cv=none; b=soCygeIa0Amy4UtqUReLXObw994XAmGsDfdGGBCIjxAttWHLfPBqmNAePUoYUy1arPZRUzHJLO4G7ZX+FpYfH5vp5etTRNdBEc8O5zf+c/M3M/q/y+KnqL6LCW3sXWpOPwGqrTkByWrFAcEkiGyBZZutMLHr72JvwS61bbiJ2aQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1736544498; c=relaxed/simple; bh=H20oFond7ismjzZwWtuGjaA2p6koI5X4gIr4usp9bYM=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=WeznnbA6XEfB2+xp2knDyVao1V2U0i84oKzNZmi8aKIFIOxJa/zxHyonV3dBrfyBT+KfxevplOZoP1HCzwV3pHlNfeZmIhaHTsXMNanqq8jDhMU6i1V+UKgioNNx2JPDQyR24e5tI8EbF67RQqywN3oFxAyYd0Z4q1c7hgoxwZo= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 68C4B3858C35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1736544498; 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: content-transfer-encoding:content-transfer-encoding; bh=ud07YFc8jrAqWXDUITDYSFYLNTFHvwUlXcwtCvOI92A=; b=I49l/MXziKXV+63uc+uWoRj60hsLOV6tpQqZAgn4nO/AnQ3IWVttJDikdlmIR39VUTZikW 9LXpvkW1xK67x2sOvOwUbWOMB0sNZjgeeVgSPRxwOmR38MnkaUFWXxN0w6aaxfdF0xwlvD JviPfAcWVF4T1EsI5+aK+njLC4pVAYg= Received: from mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-502-Wf_-lYEkNlqLhp0ZJ-IeKQ-1; Fri, 10 Jan 2025 16:28:15 -0500 X-MC-Unique: Wf_-lYEkNlqLhp0ZJ-IeKQ-1 X-Mimecast-MFC-AGG-ID: Wf_-lYEkNlqLhp0ZJ-IeKQ Received: from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.40]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id B55591955D5D; Fri, 10 Jan 2025 21:28:12 +0000 (UTC) Received: from localhost (unknown [10.42.28.9]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 0168E19560AD; Fri, 10 Jan 2025 21:28:11 +0000 (UTC) From: Jonathan Wakely <jwakely@redhat.com> To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Cc: Jonathan Wakely <redi@gcc.gnu.org> Subject: [PATCH 00/10] C++20 atomic wait/notify ABI stabilization Date: Fri, 10 Jan 2025 21:23:03 +0000 Message-ID: <20250110212810.832494-1-jwakely@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.40 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: BFtyNqfWs4CI4oq1Wj8klLfD-ay1yu8ZYFNkt3Biiwg_1736544493 X-Mimecast-Originator: redhat.com Content-Type: text/plain Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.9 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, URIBL_DBL_SPAM, URI_HEX autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Errors-To: gcc-patches-bounces~patchwork=sourceware.org@gcc.gnu.org |
| Series |
C++20 atomic wait/notify ABI stabilization
|
|
Message
Jonathan Wakely
Jan. 10, 2025, 9:23 p.m. UTC
From: Jonathan Wakely <redi@gcc.gnu.org>
This series complete Tom's work to refactor the C++20 atomic wait/notify
code. The goal is to make the implementation ready for some pieces to be
moved into libstdc++.so instead of defining everything inline in the
headers.
Also available for review at
https://forge.sourceware.org/gcc/gcc-TEST/pulls/31
This fixes:
- PR 99572 - std::counting_semaphore coalescing wakes
- PR 104928 - std::counting_semaphore on Linux can sleep forever
- PR 118395 - Constructor of std::barrier is not constexpr
Partially fixed:
- PR 98749 - No precondition checks in <semaphore>, <latch> and <barrier>
Not fixed:
- PR 115955 - atomic<T>::wait _S_for uses a poor hash function
- PR 110854 - constructor of std::counting_semaphore is not constexpr
- PR 118402 - std::barrier doesn't use futex directly
All tests pass on x86_64-linux (although I should add more tests for the
semaphore bugs in the first two PRs above). I see one remaining failure
on sparc-solaris due to a timeout:
FAIL: 30_threads/semaphore/try_acquire.cc -std=gnu++20 execution test
I still need to analyze that.
Thomas Rodgers (2):
libstdc++: Atomic wait/notify ABI stabilization
libstdc++: Pass __wait_args to internal API by const pointer
Jonathan Wakely (8):
libstdc++: Whitespace fixes in atomic wait/notify code
libstdc++: Various fixes for atomic wait/notify code
libstdc++: Fix race condition in new atomic notify code
libstdc++: Simplify futex wrapper functions for atomic wait/notify
libstdc++: Remove reinterpret_cast uses in atomic wait/notify
libstdc++: Rename __atomic_compare to __atomic_eq
libstdc++: Use safe integer comparisons in std::latch [PR98749]
libstdc++: Optimise std::latch::arrive_and_wait
libstdc++-v3/include/bits/atomic_timed_wait.h | 539 +++++++----------
libstdc++-v3/include/bits/atomic_wait.h | 552 +++++++++---------
libstdc++-v3/include/bits/semaphore_base.h | 53 +-
libstdc++-v3/include/std/barrier | 6 +-
libstdc++-v3/include/std/latch | 51 +-
.../29_atomics/atomic/wait_notify/100334.cc | 4 +-
.../29_atomics/atomic_integral/wait_notify.cc | 4 +
7 files changed, 583 insertions(+), 626 deletions(-)