public inbox for libstdc++-cvs@sourceware.org help / color / mirror / Atom feed
From: Jonathan Wakely <redi@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r12-4234] libstdc++: Avoid use of hardware interference non-constant [PR102377] Date: Thu, 7 Oct 2021 17:39:19 +0000 (GMT) [thread overview] Message-ID: <20211007173919.387B6385840C@sourceware.org> (raw) https://gcc.gnu.org/g:0e90799071ee78f712f3b58fca7000bc0a258ade commit r12-4234-g0e90799071ee78f712f3b58fca7000bc0a258ade Author: Jonathan Wakely <jwakely@redhat.com> Date: Thu Oct 7 18:28:04 2021 +0100 libstdc++: Avoid use of hardware interference non-constant [PR102377] libstdc++-v3/ChangeLog: PR libstdc++/102377 * include/bits/atomic_wait.h (__waiter_pool_base:_S_align): Hardcode to 64 instead of using non-constant constant. Diff: --- libstdc++-v3/include/bits/atomic_wait.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/libstdc++-v3/include/bits/atomic_wait.h b/libstdc++-v3/include/bits/atomic_wait.h index 35c92644146..2ac07ccd05e 100644 --- a/libstdc++-v3/include/bits/atomic_wait.h +++ b/libstdc++-v3/include/bits/atomic_wait.h @@ -190,11 +190,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION struct __waiter_pool_base { -#ifdef __cpp_lib_hardware_interference_size - static constexpr auto _S_align = hardware_destructive_interference_size; -#else - static constexpr auto _S_align = 64; -#endif + // Don't use std::hardware_destructive_interference_size here because we + // don't want the layout of library types to depend on compiler options. + static constexpr auto _S_align = 64; alignas(_S_align) __platform_wait_t _M_wait = 0;
reply other threads:[~2021-10-07 17:39 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20211007173919.387B6385840C@sourceware.org \ --to=redi@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ --cc=libstdc++-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).