public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Joseph S. Myers" <joseph@codesourcery.com>
To: Aldy Hernandez <aldyh@redhat.com>
Cc: Richard Henderson <rth@redhat.com>,
	gcc-patches <gcc-patches@gcc.gnu.org>,
	    Benjamin De Kosnik <bkoz@redhat.com>,
	Andrew MacLeod <amacleod@redhat.com>
Subject: Re: __sync_swap* with acq/rel/full memory barrier semantics
Date: Tue, 24 May 2011 09:25:00 -0000	[thread overview]
Message-ID: <Pine.LNX.4.64.1105232300520.28552@digraph.polyomino.org.uk> (raw)
In-Reply-To: <4DDAE516.4010307@redhat.com>

On Mon, 23 May 2011, Aldy Hernandez wrote:

> This is a patch implementing builtins for an atomic exchange with full,
> acquire, and release memory barrier semantics.  It is similar to
> __sync_lock_test_and_set(), but the target does not have the option of
> implementing a reduced functionality of only implementing a store of 1.  Also,
> unlike __sync_lock_test_and_set(), we have all three memory barrier variants.

What's the reason you've implemented three variants, rather than six (the 
C1X/C++0X atomics have six memory order values) or one built-in function 
taking a memory order parameter?  More generally, what is the underlying 
design here for how built-in functions should cover the whole of the new 
atomics functionality in C1X and C++0X?

Adding functions to libgcc-std.ver seems premature in the absence of any 
library implementations of them.

-- 
Joseph S. Myers
joseph@codesourcery.com

  reply	other threads:[~2011-05-23 23:06 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-24  8:27 Aldy Hernandez
2011-05-24  9:25 ` Joseph S. Myers [this message]
2011-05-30 22:53   ` Andrew MacLeod
2011-05-31 13:12     ` Jakub Jelinek
2011-05-31 15:23       ` Andrew MacLeod
2011-06-02 19:13     ` Aldy Hernandez
2011-06-02 19:25       ` Jakub Jelinek
2011-06-02 19:53         ` Aldy Hernandez
2011-06-03 14:27           ` Richard Henderson
2011-06-17 22:21             ` Andrew MacLeod
2011-06-18 19:49               ` Richard Henderson
2011-06-20 16:39                 ` Andrew MacLeod
2011-06-20 22:50                   ` Richard Henderson
2011-06-20 23:02                     ` Andrew MacLeod
2011-06-20 23:29                       ` Richard Henderson
2011-06-21 18:56                         ` __sync_swap* [ rename sync builtins ] Andrew MacLeod
2011-06-21 19:03                           ` Richard Henderson
2011-06-21 23:03                             ` Graham Stott
2011-06-21 23:26                               ` Andrew MacLeod
2011-06-22  0:59                                 ` Andrew MacLeod
2011-06-24  0:35                                 ` Ian Lance Taylor
2011-06-24  0:38                                   ` Andrew MacLeod
2011-06-21 23:03                         ` [cxx-mem-model] sync_mem_exchange implementation with memory model parameters Andrew MacLeod
2011-06-22 20:36                           ` Richard Henderson
2011-07-08 17:00                   ` __sync_swap* with acq/rel/full memory barrier semantics Aldy Hernandez
2011-06-18 23:49               ` Richard Henderson

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=Pine.LNX.4.64.1105232300520.28552@digraph.polyomino.org.uk \
    --to=joseph@codesourcery.com \
    --cc=aldyh@redhat.com \
    --cc=amacleod@redhat.com \
    --cc=bkoz@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=rth@redhat.com \
    /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: link
Be 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).