From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B2066387085E; Sat, 27 Feb 2021 03:21:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B2066387085E From: "thiago at kde dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/99277] C++2a synchronisation is inefficient in GCC 11 Date: Sat, 27 Feb 2021 03:21:03 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: ABI X-Bugzilla-Severity: normal X-Bugzilla-Who: thiago at kde dot org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Feb 2021 03:21:03 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99277 --- Comment #6 from Thiago Macieira --- We don't have to delay the release. Either of these two patches give us one more year to get it right: --- libstdc++-v3/include/bits/atomic_wait.h +++ libstdc++-v3/include/bits/atomic_wait.h @@ -32,9 +32,9 @@ #pragma GCC system_header #include -#if defined _GLIBCXX_HAS_GTHREADS || defined _GLIBCXX_HAVE_LINUX_FUTEX +#if defined _GLIBCXX_ENABLE_EXPERIMENTAL_ATOMIC_WAIT && (defined _GLIBCXX_HAS_GTHREADS || defined _GLIBCXX_HAVE_LINUX_FUTEX) #include #include #include Or --- libstdc++-v3/include/bits/atomic_base.h +++ libstdc++-v3/include/bits/atomic_base.h @@ -36,9 +36,9 @@ #include #include #include -#if __cplusplus > 201703L +#if __cplusplus > 201703L && defined _GLIBCXX_ENABLE_EXPERIMENTAL_ATOMIC_W= AIT #include #endif #ifndef _GLIBCXX_ALWAYS_INLINE=