> From: Andrew MacLeod <amacl...@redhat.com>
> Date: Mon, 7 Nov 2011 15:44:47 +0100

> 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?

In CRIS versions where such support would make sense: of course!
For cris-elf with the default multilib: no.

> I think the libstdc++ standard now requires the class atomic_flag to be 
> lock free in order to conform (n3242 29.7.2)

An early error would be the graceful way, even better to
fallback to something that works when simultaneity does not
apply in the system.  I'm on the edge if a linker warning would
be a bonus or badness. :)

> How can we tell when 
> compiling a C++ program whether that is going to be an unresolved 
> external or whether libgcc is going to provide it?

>From within gcc,
 if (HAVE_sync_really_basic_operation_somethingorotherpatternname)

which we could translate to builtin_define("__GNU_SYNC_SUPPORT")
if needed.

brgds, H-P

Reply via email to