mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-09-20 20:54:18 +08:00
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:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user