forked from Imagelibrary/rtems
2008-08-04 Joel Sherrill <joel.sherrill@OARcorp.com>
PR 1265/cpukit * score/include/rtems/score/object.h, score/src/objectallocatebyindex.c: Rename index argument to avoid warning when rtems.h and string.h are included at the same time by user code.
This commit is contained in:
@@ -1,3 +1,11 @@
|
|||||||
|
2008-08-04 Joel Sherrill <joel.sherrill@OARcorp.com>
|
||||||
|
|
||||||
|
PR 1265/cpukit
|
||||||
|
* score/include/rtems/score/object.h,
|
||||||
|
score/src/objectallocatebyindex.c: Rename index argument to avoid
|
||||||
|
warning when rtems.h and string.h are included at the same time by
|
||||||
|
user code.
|
||||||
|
|
||||||
2008-07-24 Joel Sherrill <joel.sherrill@OARcorp.com>
|
2008-07-24 Joel Sherrill <joel.sherrill@OARcorp.com>
|
||||||
|
|
||||||
PR 1291/cpukit
|
PR 1291/cpukit
|
||||||
|
|||||||
@@ -501,12 +501,12 @@ Objects_Control *_Objects_Allocate(
|
|||||||
* free object control blocks.
|
* free object control blocks.
|
||||||
*
|
*
|
||||||
* @param[in] information points to an object class information block.
|
* @param[in] information points to an object class information block.
|
||||||
* @param[in] index is the index of the object to allocate.
|
* @param[in] the_index is the index of the object to allocate.
|
||||||
* @param[in] sizeof_control is the size of the object control block.
|
* @param[in] sizeof_control is the size of the object control block.
|
||||||
*/
|
*/
|
||||||
Objects_Control *_Objects_Allocate_by_index(
|
Objects_Control *_Objects_Allocate_by_index(
|
||||||
Objects_Information *information,
|
Objects_Information *information,
|
||||||
uint16_t index,
|
uint16_t the_index,
|
||||||
uint16_t sizeof_control
|
uint16_t sizeof_control
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -41,14 +41,14 @@
|
|||||||
|
|
||||||
Objects_Control *_Objects_Allocate_by_index(
|
Objects_Control *_Objects_Allocate_by_index(
|
||||||
Objects_Information *information,
|
Objects_Information *information,
|
||||||
uint16_t index,
|
uint16_t the_index,
|
||||||
uint16_t sizeof_control
|
uint16_t sizeof_control
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
Objects_Control *the_object;
|
Objects_Control *the_object;
|
||||||
|
|
||||||
if ( index && information->maximum >= index ) {
|
if ( the_index && information->maximum >= the_index ) {
|
||||||
the_object = information->local_table[ index ];
|
the_object = information->local_table[ the_index ];
|
||||||
if ( the_object )
|
if ( the_object )
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
@@ -61,7 +61,7 @@ Objects_Control *_Objects_Allocate_by_index(
|
|||||||
|
|
||||||
the_object = (Objects_Control *) _Addresses_Add_offset(
|
the_object = (Objects_Control *) _Addresses_Add_offset(
|
||||||
information->object_blocks[ 0 ],
|
information->object_blocks[ 0 ],
|
||||||
(sizeof_control * (index - 1))
|
(sizeof_control * (the_index - 1))
|
||||||
);
|
);
|
||||||
_Chain_Extract( &the_object->Node );
|
_Chain_Extract( &the_object->Node );
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user