Gsoc2012: Atomic operation for RTEMS
Chris Johns
chrisj at rtems.org
Thu May 17 02:22:47 UTC 2012
On 16/05/12 11:07 PM, Sebastian Huber wrote:
> Hi,
>
> thanks for your nice overview about some existing atomic APIs. I am no
> longer of the option to use the <stdatomic.h> facility to implement the
> SMP locks on RTEMS. Too much is controlled internally by the compiler.
> Also the results on PowerPC are not optimal from my point of view:
>
> http://gcc.gnu.org/ml/gcc-help/2012-03/msg00377.html
>
> Who will be the user of this atomic API?
>
This is a key question and one which makes the this area of work
complicated in the future. RTEMS is both the kernel and application and
this means the atomic operations API we provide for the kernel to use
and that provided by a standard language feature need to co-exist.
Personally I am not convinced C++ is the best place to depend on this
type of thing and I would be rather cautious before committing an
application development to it. Yes the API makes the code portable and
the functionality stable across platforms, how-ever everyone needs to
get to that point first and specifically the compiler writers before it
is true. I have only ever developed a couple of fully C++ embedded
applications. Most are a mixture of C and C++ and that is one area I am
not sure about. RTEMS needs to provide support to C applications.
RTEMS has to support the C++ standard but do we need to do this now ? I
agree with you we should develop our own kernel level API and provide it
as an RTEMS API, ie following the classic API. How this relates to the
C++ support in the future can be visited one we have something our C
based kernel can use.
Chris
More information about the devel
mailing list