forked from Imagelibrary/rtems
2008-01-24 Joel Sherrill <joel.sherrill@oarcorp.com>
* score/include/rtems/score/object.h, score/src/objectextendinformation.c, score/src/objectinitializeinformation.c, score/src/objectshrinkinformation.c: Eliminate name_table since it is not used.
This commit is contained in:
@@ -1,3 +1,11 @@
|
|||||||
|
2008-01-24 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||||
|
|
||||||
|
* score/include/rtems/score/object.h,
|
||||||
|
score/src/objectextendinformation.c,
|
||||||
|
score/src/objectinitializeinformation.c,
|
||||||
|
score/src/objectshrinkinformation.c: Eliminate name_table since it is
|
||||||
|
not used.
|
||||||
|
|
||||||
2008-01-23 Joel Sherrill <joel.sherrill@oarcorp.com>
|
2008-01-23 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||||
|
|
||||||
* score/src/objectnametoidstring.c: New file.
|
* score/src/objectnametoidstring.c: New file.
|
||||||
|
|||||||
@@ -341,9 +341,6 @@ typedef struct {
|
|||||||
size_t size;
|
size_t size;
|
||||||
/** This points to the table of local objects. */
|
/** This points to the table of local objects. */
|
||||||
Objects_Control **local_table;
|
Objects_Control **local_table;
|
||||||
/** This points to the table of local object names. */
|
|
||||||
/* XXX should be safe to remove this field */
|
|
||||||
uint32_t **name_table;
|
|
||||||
/** This is the chain of inactive control blocks. */
|
/** This is the chain of inactive control blocks. */
|
||||||
Chain_Control Inactive;
|
Chain_Control Inactive;
|
||||||
/** This is the number of objects on the Inactive list. */
|
/** This is the number of objects on the Inactive list. */
|
||||||
|
|||||||
@@ -47,7 +47,6 @@ void _Objects_Extend_information(
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
Objects_Control *the_object;
|
Objects_Control *the_object;
|
||||||
void *name_area;
|
|
||||||
Chain_Control Inactive;
|
Chain_Control Inactive;
|
||||||
uint32_t block_count;
|
uint32_t block_count;
|
||||||
uint32_t block;
|
uint32_t block;
|
||||||
@@ -84,7 +83,6 @@ void _Objects_Extend_information(
|
|||||||
if (index_base >= information->maximum ) {
|
if (index_base >= information->maximum ) {
|
||||||
ISR_Level level;
|
ISR_Level level;
|
||||||
void **object_blocks;
|
void **object_blocks;
|
||||||
void **name_table;
|
|
||||||
uint32_t *inactive_per_block;
|
uint32_t *inactive_per_block;
|
||||||
Objects_Control **local_table;
|
Objects_Control **local_table;
|
||||||
uint32_t maximum;
|
uint32_t maximum;
|
||||||
@@ -101,7 +99,6 @@ void _Objects_Extend_information(
|
|||||||
*
|
*
|
||||||
* void *objects[block_count];
|
* void *objects[block_count];
|
||||||
* uint32_t inactive_count[block_count];
|
* uint32_t inactive_count[block_count];
|
||||||
* Objects_Name *name_table[block_count];
|
|
||||||
* Objects_Control *local_table[maximum];
|
* Objects_Control *local_table[maximum];
|
||||||
*
|
*
|
||||||
* This is the order in memory. Watch changing the order. See the memcpy
|
* This is the order in memory. Watch changing the order. See the memcpy
|
||||||
@@ -135,7 +132,7 @@ void _Objects_Extend_information(
|
|||||||
object_blocks = (void**)
|
object_blocks = (void**)
|
||||||
_Workspace_Allocate_or_fatal_error(
|
_Workspace_Allocate_or_fatal_error(
|
||||||
block_count *
|
block_count *
|
||||||
(sizeof(void *) + sizeof(uint32_t ) + sizeof(Objects_Name *)) +
|
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
|
||||||
((maximum + minimum_index) * sizeof(Objects_Control *))
|
((maximum + minimum_index) * sizeof(Objects_Control *))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -147,10 +144,8 @@ void _Objects_Extend_information(
|
|||||||
|
|
||||||
inactive_per_block = (uint32_t *) _Addresses_Add_offset(
|
inactive_per_block = (uint32_t *) _Addresses_Add_offset(
|
||||||
object_blocks, block_count * sizeof(void*) );
|
object_blocks, block_count * sizeof(void*) );
|
||||||
name_table = (void *) _Addresses_Add_offset(
|
|
||||||
inactive_per_block, block_count * sizeof(uint32_t ) );
|
|
||||||
local_table = (Objects_Control **) _Addresses_Add_offset(
|
local_table = (Objects_Control **) _Addresses_Add_offset(
|
||||||
name_table, block_count * sizeof(Objects_Name *) );
|
inactive_per_block, block_count * sizeof(uint32_t) );
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Take the block count down. Saves all the (block_count - 1)
|
* Take the block count down. Saves all the (block_count - 1)
|
||||||
@@ -172,9 +167,6 @@ void _Objects_Extend_information(
|
|||||||
memcpy( inactive_per_block,
|
memcpy( inactive_per_block,
|
||||||
information->inactive_per_block,
|
information->inactive_per_block,
|
||||||
block_count * sizeof(uint32_t ) );
|
block_count * sizeof(uint32_t ) );
|
||||||
memcpy( name_table,
|
|
||||||
information->name_table,
|
|
||||||
block_count * sizeof(Objects_Name *) );
|
|
||||||
memcpy( local_table,
|
memcpy( local_table,
|
||||||
information->local_table,
|
information->local_table,
|
||||||
(information->maximum + minimum_index) * sizeof(Objects_Control *) );
|
(information->maximum + minimum_index) * sizeof(Objects_Control *) );
|
||||||
@@ -195,7 +187,6 @@ void _Objects_Extend_information(
|
|||||||
|
|
||||||
object_blocks[block_count] = NULL;
|
object_blocks[block_count] = NULL;
|
||||||
inactive_per_block[block_count] = 0;
|
inactive_per_block[block_count] = 0;
|
||||||
// name_table[block_count] = NULL;
|
|
||||||
|
|
||||||
for ( index=index_base ;
|
for ( index=index_base ;
|
||||||
index < ( information->allocation_size + index_base );
|
index < ( information->allocation_size + index_base );
|
||||||
@@ -209,7 +200,6 @@ void _Objects_Extend_information(
|
|||||||
|
|
||||||
information->object_blocks = object_blocks;
|
information->object_blocks = object_blocks;
|
||||||
information->inactive_per_block = inactive_per_block;
|
information->inactive_per_block = inactive_per_block;
|
||||||
information->name_table = (void *)name_table;
|
|
||||||
information->local_table = local_table;
|
information->local_table = local_table;
|
||||||
information->maximum = maximum;
|
information->maximum = maximum;
|
||||||
information->maximum_id = _Objects_Build_id(
|
information->maximum_id = _Objects_Build_id(
|
||||||
@@ -249,12 +239,6 @@ void _Objects_Extend_information(
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
name_area = (Objects_Name *) _Addresses_Add_offset(
|
|
||||||
information->object_blocks[ block ],
|
|
||||||
(information->allocation_size * information->size)
|
|
||||||
);
|
|
||||||
// information->name_table[ block ] = name_area;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Initialize objects .. add to a local chain first.
|
* Initialize objects .. add to a local chain first.
|
||||||
*/
|
*/
|
||||||
@@ -281,8 +265,6 @@ void _Objects_Extend_information(
|
|||||||
index
|
index
|
||||||
);
|
);
|
||||||
|
|
||||||
name_area = (void *)_Addresses_Add_offset( name_area, information->name_length );
|
|
||||||
|
|
||||||
_Chain_Append( &information->Inactive, &the_object->Node );
|
_Chain_Append( &information->Inactive, &the_object->Node );
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
|
|||||||
@@ -74,7 +74,6 @@ void _Objects_Initialize_information(
|
|||||||
information->is_string = is_string;
|
information->is_string = is_string;
|
||||||
|
|
||||||
information->local_table = 0;
|
information->local_table = 0;
|
||||||
information->name_table = 0;
|
|
||||||
information->inactive_per_block = 0;
|
information->inactive_per_block = 0;
|
||||||
information->object_blocks = 0;
|
information->object_blocks = 0;
|
||||||
|
|
||||||
|
|||||||
@@ -105,7 +105,6 @@ void _Objects_Shrink_information(
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
_Workspace_Free( information->object_blocks[ block ] );
|
_Workspace_Free( information->object_blocks[ block ] );
|
||||||
information->name_table[ block ] = NULL;
|
|
||||||
information->object_blocks[ block ] = NULL;
|
information->object_blocks[ block ] = NULL;
|
||||||
information->inactive_per_block[ block ] = 0;
|
information->inactive_per_block[ block ] = 0;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user