This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: notes on current atomics config and usage
- From: Geoffrey Keating <geoffk at apple dot com>
- To: Benjamin Kosnik <bkoz at redhat dot com>
- Cc: libstdc++ at gcc dot gnu dot org
- Date: 06 Jul 2006 20:26:22 -0700
- Subject: Re: notes on current atomics config and usage
- References: <20060706152014.0caf055c.bkoz@redhat.com>
Benjamin Kosnik <bkoz@redhat.com> writes:
...
> Anyway. A real, unsettled meta-question is the use of atomic ops in
> inline functions. This seems fine, except for the x86 quandary.
>
> Damn you, i386.
>
> The only solution for i386/i486+ nightmare is to make all atomic calls
> non-inline, all calls to atomic operations wrapped in external "C"
> functions.
My suggestion for this is that it should happen only when the user is
using -march=i386. If the user says, say, -march=pentiumpro then the
inline versions can appear (compatible with the wrappers but assuming
i486+), since such binaries would only run on i486+ anyway.
Or, go with Ian's suggestion.