body functions

Ralf Corsepius ralf.corsepius at rtems.org
Thu Dec 8 11:25:27 CST 2011


Hi,

RTEMS contains a set of functions which are implemented as both #defines 
and as normal functions (aka. body functions)[1].

This raises a couple implementation problems in RTEMS esp, wrt.
using the compiler to enforce stricter coding standards.

As things currently appear to me, the only usage of these "body 
functions" is supporting GNAT/Ada, while no pure C application nor RTEMS 
itself uses them - Is this understanding correct?


Fact seems to be something should be done to get them "out of way" of 
the C-part of RTEMS to simplify improving the coding quality of RTEMS[2].


I am not sure what do ... crude, uncooked ideas would be:

- Split these functions out into a separate library?
- Move the "body functions" to cpukit/libgnat?
- Eliminate the #defines and supply C-body functions only?

It's not clear to me which of these ideas are useful or would really 
make sense.


Ralf


[1] contained in
cpukit/rtems/src/intrbody.c
cpukit/rtems/src/rtemsbuildid.c
cpukit/rtems/src/rtemsbuildname.c
cpukit/rtems/src/rtemsobjectidapimaximum.c
cpukit/rtems/src/rtemsobjectidapiminimum.c
cpukit/rtems/src/rtemsobjectidgetapi.c
cpukit/rtems/src/rtemsobjectidgetclass.c
cpukit/rtems/src/rtemsobjectidgetindex.c
cpukit/rtems/src/rtemsobjectidgetnode.c
cpukit/score/src/threaddispatch.c
cpukit/score/src/threadinitialize.c

used by:
testsuites/sptests/sp37/init.c
testsuites/sptests/sp43/init.c



[2] This weeks's PR and patch flood has its origin in me compiling RTEMS 
with very aggressive GCC-warning flags.

Initial result: >5000 warnings per BSP, with several quite serious ones 
amongst them.


More information about the rtems-devel mailing list