GSOC2013-Atomic Operations and SMP lock debug tool

Gedare Bloom gedare at
Fri Jun 7 15:36:04 UTC 2013

On Fri, Jun 7, 2013 at 7:26 AM, Sebastian Huber
<sebastian.huber at> wrote:
> On 06/04/2013 04:53 PM, Deng Hengyi wrote:
>> In my option, we can use the exist atomic ops API and if the architecture
>> atomic ops is supported by GCC C11 we can wrap its API into our atomic API,
>> others remains no change. And this is also useful for the older GCC
>> compliers maintained by developer.  And this switch way is  step by step.
> It is all right to have an own API that can be easily implemented with the
> stuff from <stdatomic.h>.  We should make sure that this works for ARMv7,
> PowerPC, SPARC [1] and x86.
> If someone uses a non C11 compiler, then he can implement this atomic API on
> its own as a fall back.
> [1] I am not sure that the Leon core supports the GCC implementation.  The
> current cpusmplock.h contains a Leon specific feature (usage of non-cached
> address space).  GCC is definitely not aware of such a hack.
I also heard the Leon supports some instructions that come from the V9
instruction set, specifically the CASA. That instruction is also
unlikely to be used by GCC, but might be beneficial for a customized
implementation of atomic operations.

> --
> Sebastian Huber, embedded brains GmbH
> Address : Dornierstr. 4, D-82178 Puchheim, Germany
> Phone   : +49 89 189 47 41-16
> Fax     : +49 89 189 47 41-09
> E-Mail  : sebastian.huber at
> PGP     : Public key available on request.
> Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
> _______________________________________________
> rtems-users mailing list
> rtems-users at

More information about the users mailing list