public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Joseph S. Myers" <joseph@codesourcery.com>
To: Andrew MacLeod <amacleod@redhat.com>
Cc: Richard Henderson <rth@redhat.com>,
	Lawrence Crowl <crowl@google.com>,
	    Benjamin Kosnik <bkoz@redhat.com>,
	Aldy Hernandez <aldyh@redhat.com>,     GCC <gcc@gcc.gnu.org>
Subject: Re: C++11 atomic library notes
Date: Mon, 03 Oct 2011 19:52:00 -0000	[thread overview]
Message-ID: <Pine.LNX.4.64.1110031951520.18783@digraph.polyomino.org.uk> (raw)
In-Reply-To: <4E89F6C6.8050504@redhat.com>

On Mon, 3 Oct 2011, Andrew MacLeod wrote:

> On 10/03/2011 01:31 PM, Richard Henderson wrote:
> > On 09/30/2011 01:36 PM, Andrew MacLeod wrote:
> > > http://gcc.gnu.org/wiki/Atomic/GCCMM/LIbrary
> > 
> > >    __atomic_store (size_t obj_size, T *mem, T val, enum memory_model
> > > model)
> > I don't like this.  I really cannot imagine any situation for which the
> > compiler can't resolve SIZE to a compile-time constant.  I think it's
> > pointless to have a dispatch routine that just calls all of
> > 
> its a library call for arbitrary sized objects...  C++ can have any class
> declared atomic, so it doesn't have to map to one of those optimized lock-free
> routines.

Likewise, in C1X you can also apply _Atomic to arbitrary-size structures.

-- 
Joseph S. Myers
joseph@codesourcery.com

  parent reply	other threads:[~2011-10-03 19:52 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4E862864.2010607@redhat.com>
2011-10-01  6:56 ` Marc Glisse
2011-10-01 23:12   ` Andrew MacLeod
2011-10-02  8:40     ` Marc Glisse
2011-10-02 13:56       ` Andrew MacLeod
2011-10-03 17:31 ` Richard Henderson
2011-10-03 17:54   ` Andrew MacLeod
2011-10-03 18:10     ` Richard Henderson
2011-10-03 19:52     ` Joseph S. Myers [this message]
2011-10-05  7:26 ` Jeffrey Yasskin
2011-10-05 18:58   ` Andrew MacLeod
2011-10-05 19:07     ` Jeffrey Yasskin
2011-10-05 20:12       ` Andrew MacLeod

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.1110031951520.18783@digraph.polyomino.org.uk \
    --to=joseph@codesourcery.com \
    --cc=aldyh@redhat.com \
    --cc=amacleod@redhat.com \
    --cc=bkoz@redhat.com \
    --cc=crowl@google.com \
    --cc=gcc@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).