This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: cxx-mem-model merge [6 of 9] - libstdc++-v3
- From: Hans-Peter Nilsson <hans-peter dot nilsson at axis dot com>
- To: joseph at codesourcery dot com
- Cc: amacleod at redhat dot com, hp at axis dot com, hp at axis dot com, gcc-patches at gcc dot gnu dot org, libstdc++ at gcc dot gnu dot org, bkoz at redhat dot com, rth at redhat dot com
- Date: Mon, 7 Nov 2011 18:32:02 +0100
- Subject: Re: cxx-mem-model merge [6 of 9] - libstdc++-v3
> From: "Joseph S. Myers" <joseph@codesourcery.com>
> Date: Mon, 7 Nov 2011 17:24:04 +0100
> On Mon, 7 Nov 2011, Andrew MacLeod wrote:
>
> > Actually, this target has no lock free support whatsoever? ie, no
> > compare_and_swap instruction, nor an implementation of sync_lock_test_and_set
> > and sync_lock_release?
> >
> > I think the libstdc++ standard now requires the class atomic_flag to be lock
> > free in order to conform (n3242 29.7.2)
> >
> > So I guess this is the situation which all the atomic tests are not even
> > suppose to be run since they aren't supported. My guess is that in the
> > previous releases the c++ header files probably provided a locked
> > implementation of test_and_set, and so the tests would run.
>
> For bare-metal targets there should maybe be an option to presume there is
> just one thread and map all atomic operations to dumb non-atomic versions,
> which is perfectly valid in such a case. But that's a new feature; we
> didn't have it for __sync_* either.
It'd not be a new feature, that's apparently how it worked until
it broke now ...unless you mean something different.
brgds, H-P