This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: gcc 4.1 implements compiler builtins for atomic ops
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- To: carlos at systemhalted dot org (Carlos O'Donell)
- Cc: benh at kernel dot crashing dot org, anuj dot goyal at gmail dot com, hollis at penguinppc dot org, libc-alpha at sources dot redhat dot com, roland at redhat dot com, dave dot anglin at nrc-cnrc dot gc dot ca
- Date: Mon, 27 Jun 2005 13:38:22 -0400 (EDT)
- Subject: Re: gcc 4.1 implements compiler builtins for atomic ops
> > Damn, these things should be in glibc, not the compiler !
>
> I want to use the vDSO to hide the light-weight-syscall behind a
> versionable interface.
I'm not so sure. Calls are expensive. Also, they affect memory
barrier semantics. If the operations are not a full barrier, gcc
needs to know. See extend.texi in gcc 4.1.
> If gcc required atomic operations they would come from glibc or the
> vDSO. I am willing to pay the price of a function call. In gcc I will
> just emit a libcall.
Dave
--
J. David Anglin dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6602)