Project about Atomic Operations

Yang Wei wei.a.yang at gmail.com
Mon Mar 26 15:31:28 UTC 2012



在 2012-3-26,22:59,Sebastian Huber <sebastian.huber at embedded-brains.de> 写道:

> On 03/26/2012 04:43 PM, Yang Wei wrote:
>> Hi Huber,
>>     The implementation of C 2011 standard should also be part of compiler,right?
> 
> Yes, but the compiler might need help from the operating system.
That means the implementation is corresponding to the OS type. With regard with Rtems its implementation should be placed in newlib. But this means the synchronization primitives which is built on the atomic primitives will rely the newlib. I think it is not suitable. Other OS like Linux, FreeBSD, NetBSD all implement its own atomic primitives rather than relying the standard library.
> 
>> I am not really familiar with its implementation. And the C 2011 support all architecture atomic primitive?
> 
> The atomic support is optional, but I guess GCC will support it on all main architectures.  Please also have a look in the standard:
> 
> http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf
> 
Thank you for your reference, huber. It's a very good material. I think we can refer its API definition for atomic primitive, but it is not necessary to implement all its definitions.
> -- 
> 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.




More information about the users mailing list