Changeset 59d1127 in rtems
- Timestamp:
- 11/10/99 22:14:26 (24 years ago)
- Branches:
- 4.10, 4.11, 4.8, 4.9, 5, master
- Children:
- 713b2ea
- Parents:
- 7d29dc7f
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
c/src/exec/score/src/objectallocatebyindex.c
r7d29dc7f r59d1127 44 44 { 45 45 Objects_Control *the_object; 46 void *p;47 46 48 47 if ( index && information->maximum >= index ) { 48 /* 49 * If the object is already in the local table, then 50 * it has already been allocated/created by a previous 51 * create call. 52 */ 53 49 54 the_object = _Objects_Get_local_object( information, index ); 50 55 if ( the_object ) … … 53 58 /* XXX 54 59 * This whole section of code needs to be addressed. 55 * + The 0 should be dealt with more properly so we can autoextend.56 * + The pointer arithmetic is probably too expensive.60 * + The use of the index 0 for object_blocks should be dealt 61 * with more properly so we can autoextend. 57 62 * + etc. 58 63 */ 59 64 60 p = _Addresses_Add_offset( information->object_blocks[ 0 ], 61 (information->allocation_size * information->name_length) ), 65 the_object = (Objects_Control *) information->object_blocks[ 0 ]; 62 66 63 p = _Addresses_Add_offset( p, (sizeof_control * (index - 1)) );64 the_object = (Objects_Control *)p;65 67 _Chain_Extract( &the_object->Node ); 66 68 -
cpukit/score/src/objectallocatebyindex.c
r7d29dc7f r59d1127 44 44 { 45 45 Objects_Control *the_object; 46 void *p;47 46 48 47 if ( index && information->maximum >= index ) { 48 /* 49 * If the object is already in the local table, then 50 * it has already been allocated/created by a previous 51 * create call. 52 */ 53 49 54 the_object = _Objects_Get_local_object( information, index ); 50 55 if ( the_object ) … … 53 58 /* XXX 54 59 * This whole section of code needs to be addressed. 55 * + The 0 should be dealt with more properly so we can autoextend.56 * + The pointer arithmetic is probably too expensive.60 * + The use of the index 0 for object_blocks should be dealt 61 * with more properly so we can autoextend. 57 62 * + etc. 58 63 */ 59 64 60 p = _Addresses_Add_offset( information->object_blocks[ 0 ], 61 (information->allocation_size * information->name_length) ), 65 the_object = (Objects_Control *) information->object_blocks[ 0 ]; 62 66 63 p = _Addresses_Add_offset( p, (sizeof_control * (index - 1)) );64 the_object = (Objects_Control *)p;65 67 _Chain_Extract( &the_object->Node ); 66 68
Note: See TracChangeset
for help on using the changeset viewer.