2007-11-07 Joel Sherrill <joel.sherrill@OARcorp.com>

* score/inline/rtems/score/object.inl: During test coverage analysis,
	we identified this sanity check which should have been conditional on
	RTEMS_DEBUG since it can NOT be tripped during normal RTEMS
	operations. With all APIs enabled, this saved 352 bytes from the
	minimum executable on the SPARC/ERC32.
This commit is contained in:
Joel Sherrill
2007-11-07 23:26:44 +00:00
parent edf4ee47df
commit f2e4e67160
2 changed files with 25 additions and 3 deletions
+8
View File
@@ -1,3 +1,11 @@
2007-11-07 Joel Sherrill <joel.sherrill@OARcorp.com>
* score/inline/rtems/score/object.inl: During test coverage analysis,
we identified this sanity check which should have been conditional on
RTEMS_DEBUG since it can NOT be tripped during normal RTEMS
operations. With all APIs enabled, this saved 352 bytes from the
minimum executable on the SPARC/ERC32.
2007-11-07 Joel Sherrill <joel.sherrill@OARcorp.com>
* score/include/rtems/system.h, score/include/rtems/score/interr.h: Add
+17 -3
View File
@@ -7,7 +7,7 @@
* This include file contains the static inline implementation of all
* of the inlined routines in the Object Handler.
*
* COPYRIGHT (c) 1989-2006.
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -200,6 +200,11 @@ RTEMS_INLINE_ROUTINE Objects_Control *_Objects_Get_local_object(
* @param[in] information points to an Object Information Table
* @param[in] index is the index of the object the caller wants to access
* @param[in] the_object is the local object pointer
*
* @note This routine is ONLY to be called in places where the
* index portion of the Id is known to be good. This is
* OK since it is normally called from object create/init
* or delete/destroy operations.
*/
RTEMS_INLINE_ROUTINE void _Objects_Set_local_object(
@@ -208,8 +213,17 @@ RTEMS_INLINE_ROUTINE void _Objects_Set_local_object(
Objects_Control *the_object
)
{
if ( index <= information->maximum )
information->local_table[ index ] = the_object;
/*
* This routine is ONLY to be called from places in the code
* where the Id is known to be good. Therefore, this should NOT
* occur in normal situations.
*/
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
}
/**