Hello,

we have a couple of implementation-specific inline functions defined in header files which have exactly one caller. I think we should remove these functions in general, to reduce the lines of code, making code review easier, and reduce the number of functions which need documentation. If it makes the caller site more clear, then we should place them in the source file of the caller. Examples:

cpukit/rtems/src/partcreate.c:  the_partition = _Partition_Allocate();
cpukit/include/rtems/rtems/partimpl.h:RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Allocate ( void )

cpukit/include/rtems/rtems/regionimpl.h:RTEMS_INLINE_ROUTINE bool _Region_Free_segment ( cpukit/rtems/src/regionreturnsegment.c:  if ( _Region_Free_segment( the_region, segment ) ) {

cpukit/sapi/src/extensiondelete.c:  the_extension = _Extension_Get( id );
cpukit/include/rtems/extensionimpl.h:RTEMS_INLINE_ROUTINE Extension_Control *_Extension_Get( Objects_Id id )

cpukit/sapi/src/extensioncreate.c:  the_extension = _Extension_Allocate();
cpukit/include/rtems/extensionimpl.h:RTEMS_INLINE_ROUTINE Extension_Control *_Extension_Allocate( void )

cpukit/sapi/src/extensiondelete.c:    _Extension_Free( the_extension );
cpukit/include/rtems/extensionimpl.h:RTEMS_INLINE_ROUTINE void _Extension_Free (

What do you think?

_______________________________________________
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Reply via email to