Project about Atomic Operations

Thomas Doerfler Thomas.Doerfler at embedded-brains.de
Mon Mar 26 16:19:39 UTC 2012


Hi,

I am a bit confused about this discussion. I havn't looked into the
RTEMS/GSOC project related to atomic support, but I agree with Sebastian
that it doesn't make sense to implement an RTEMS-specific atomic API
that would replace the C11 standard API.

What might make sense is to

- develop an API for RTEMS synchronization/kernel services which is ON
TOP of the C11 atomic standard

- develp support routines (maybe in newlib, maybe in RTEMS) that
implements a synchronization function.

Maybe for the discussion the following wiki page might help:

http://gcc.gnu.org/wiki/Atomic

It lists the architectures that GCC directly supports for atomics. All
other architectures (including ARM, M68K) require library support to get
atomic operations to work properly. So at least _this_ would be work
that requires doing.

wkr,

Thomas.


Am 26.03.2012 18:00, schrieb Yang Wei:
> 
> 
> 在 2012-3-26,23:45,Sebastian Huber <sebastian.huber at embedded-brains.de> 写道:
> 
>> On 03/26/2012 05:32 PM, Gedare Bloom wrote:
>>> Maybe we should design our API to be at least a superset of what the
>>> compiler must provide for C11 compliance. Target architectures /
>>> compilers that do not support the C11 atomics will need the atomic
>>> operations implemented in assembly language. For targets that are
>>> supported the API will thinly wrap the C-language atomic features and
>>> can share code.
>>
>> This is reinventing the wheel.  I don't see why we need the 100th atomic library.
>>
> The C11 support for atomic primitive since 2011. Whether the compiler like gcc has support all the atomic primitives and for all architectures? And Rtems does not use standard library provided by compiler, so we still support all the atomic primitives on the newlib. There are also lots of work to do if we support all the atomic primitives defined by C11 standard
>> -- 
>> Sebastian Huber, embedded brains GmbH
>>
>> Address : Obere Lagerstr. 30, D-82178 Puchheim, Germany
>> Phone   : +49 89 18 90 80 79-6
>> Fax     : +49 89 18 90 80 79-9
>> E-Mail  : sebastian.huber at embedded-brains.de
>> PGP     : Public key available on request.
>>
>> Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
> 
> _______________________________________________
> rtems-users mailing list
> rtems-users at rtems.org
> http://www.rtems.org/mailman/listinfo/rtems-users


-- 
--------------------------------------------
Embedded Brains GmbH
Thomas Doerfler           Obere Lagerstr. 30
D-82178 Puchheim          Germany
email: Thomas.Doerfler at embedded-brains.de
Phone: +49-89-18908079-2
Fax:   +49-89-18908079-9



More information about the users mailing list