This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Add atomic type qualifier
- From: Andi Kleen <andi at firstfloor dot org>
- To: Andrew MacLeod <amacleod at redhat dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>, hp at bitrange dot com
- Date: Fri, 26 Jul 2013 14:13:39 -0700
- Subject: Re: [PATCH] Add atomic type qualifier
- References: <51F2AEB1 dot 60408 at redhat dot com> <87ob9pm9gt dot fsf at tassilo dot jf dot intel dot com> <51F2CEFB dot 1040000 at redhat dot com>
Andrew MacLeod <amacleod@redhat.com> writes:
>>
> The way the standard is defined, any implicit operation like that is
> seq_cst. If you want something other than seq-cst, you have to
> explicitly call atomic_store (&x, 0, model).
Thanks.
This doesn't sound like a good default for x86. seq_cst requires
somewhat expensive extra barriers that most people most likely don't
need.
-Andi
--
ak@linux.intel.com -- Speaking for myself only