[rtems commit] tests: atomic support for RTEMS. Uniprocessor tests for atomic ops.

Chris Johns chrisj at rtems.org
Fri Feb 8 01:36:49 UTC 2013

Gedare Bloom wrote:
> I suppose the question is whether we want to let code that includes
> the atomics compile for an unsupported CPU. I think we should define a
> minimal stub that allows the code to compile and assert(false) so that
> any user that actually tries it will get an obvious failure.

I suppose this comes down to the place conditional support for atomics 
is placed and their use in the kernel. If RTEMS only supported SMP 
systems all archs would need to provide them and asserts would work. As 
RTEMS does not it would mean every place an atomic is used a conditional 
define is needed (yuck) or the atomic call becomes a 'nop' on archs with 
no atomic instructions or when being built for a single cpu system where 
atomic locking is not needed.

> An alternate solution would be to use automagic to prevent the
> spatomic* from being included.

No thanks.

> Maybe if we had an experimental flag :)



More information about the devel mailing list