public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "alexey.lapshin at oracle dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c/65146] alignment of _Atomic structure member is not correct Date: Fri, 20 Feb 2015 22:51:00 -0000 [thread overview] Message-ID: <bug-65146-4-dSRgGRO7Fp@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-65146-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65146 --- Comment #2 from Alexey Lapshin <alexey.lapshin at oracle dot com> --- if alignment of atomic object less then it`s size then it could not be lock-free on x86 32. If that object would split across cache lines then the operation would not be atomic. At the same time compiler reports for this 8-bytes size object: __atomic_always_lock_free(sizeof(obj2.ao), &obj2.ao) TRUE atomic_is_lock_free( &obj2.ao ) TRUE so it looks like lock-free atomic operation on this 4-bytes aligned data object could fail to be atomic.
next prev parent reply other threads:[~2015-02-20 22:14 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-02-20 19:58 [Bug c/65146] New: " alexey.lapshin at oracle dot com 2015-02-20 21:43 ` [Bug c/65146] " joseph at codesourcery dot com 2015-02-20 22:51 ` alexey.lapshin at oracle dot com [this message] 2015-02-20 23:32 ` joseph at codesourcery dot com 2020-08-26 14:59 ` [Bug target/65146] " jason at gcc dot gnu.org 2020-08-26 16:03 ` jakub at gcc dot gnu.org 2020-08-26 17:33 ` jakub at gcc dot gnu.org 2020-08-26 17:58 ` hjl.tools at gmail dot com 2020-08-27 16:45 ` cvs-commit at gcc dot gnu.org 2022-04-27 12:37 ` peter at cordes dot ca 2023-12-04 10:10 ` egallager at gcc dot gnu.org
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=bug-65146-4-dSRgGRO7Fp@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@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).