[rtems commit] Using the generic atomic ops to implement UP mode atomic for all architectures . SMP atomic port will be later.

Thomas Doerfler Thomas.Doerfler at embedded-brains.de
Wed May 1 15:15:40 UTC 2013


Hi Gedare,

Am 01.05.2013 17:07, schrieb Gedare Bloom:
> On Wed, May 1, 2013 at 11:03 AM, Gedare Bloom <gedare at rtems.org> wrote:
> If we add the SMP mode atomic operations for this CPU directly in this
> file, then it will need the C++ guard in place to prevent mangling the
> function names.

Agreed, but then the C++ guard should IMHO only wrap the atomic
operations, not further include files. If the other include files are
wrapped with the C++ guard, then they have no chance to emit code which
should be seen non-guarded from C++.

So instead of

- guard open
- if (XXX)
-    include "xxx"
- else
-    new code/declarations
- endif
- guard close

the proper sequence should be

- if (XXX)
-    include "xxx"
- else
-    guard open
-    new code/declarations
-    guard close
- endif

wkr,

Thomas.

> 
>> The SMP mode should be left as a placeholder for when SMP support is
>> added. Perhaps a #warning or even #error should be added there to
>> indicate there is a problem.
>>
>>> Ralf
>>>
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> rtems-devel mailing list
>>> rtems-devel at rtems.org
>>> http://www.rtems.org/mailman/listinfo/rtems-devel
> _______________________________________________
> rtems-devel mailing list
> rtems-devel at rtems.org
> http://www.rtems.org/mailman/listinfo/rtems-devel
> 


-- 
--------------------------------------------
embedded brains GmbH
Thomas Doerfler
Dornierstr. 4
D-82178 Puchheim
Germany
email: Thomas.Doerfler at embedded-brains.de
Phone: +49-89-18 94 741-12
Fax:   +49-89-18 94 741-09
PGP: Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.



More information about the devel mailing list