diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index e7486afe4f..e16172f4ba 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,3 +1,10 @@ +2011-11-29 Joel Sherrill + + PR 1967/cpukit + * score/include/rtems/score/object.h, + score/src/objectinitializeinformation.c: Remove + OBJECTS_NAME_ALIGNMENT and uses. + 2011-11-28 Joel Sherrill PR 1941/cpukit diff --git a/cpukit/score/include/rtems/score/object.h b/cpukit/score/include/rtems/score/object.h index 703050feaa..4f2147cd99 100644 --- a/cpukit/score/include/rtems/score/object.h +++ b/cpukit/score/include/rtems/score/object.h @@ -64,13 +64,6 @@ typedef union { uint32_t name_u32; } Objects_Name; -/** - * Space for object names is allocated in multiples of this. - * - * NOTE: Must be a power of 2. Matches the name manipulation routines. - */ -#define OBJECTS_NAME_ALIGNMENT sizeof( uint32_t ) - /** * Functions which compare names are prototyped like this. */ diff --git a/cpukit/score/src/objectinitializeinformation.c b/cpukit/score/src/objectinitializeinformation.c index 882274a18d..0498afa51e 100644 --- a/cpukit/score/src/objectinitializeinformation.c +++ b/cpukit/score/src/objectinitializeinformation.c @@ -128,18 +128,12 @@ void _Objects_Initialize_information( /* * Calculate the maximum name length * - * NOTE: Always 4 bytes long in Class so aligned. It is POSIX name - * lengths that may be an odd number of bytes. + * NOTE: Either 4 bytes for Classic API names or an arbitrary + * number for POSIX names which are strings that may be + * an odd number of bytes. */ - name_length = maximum_name_length; - #if defined(RTEMS_POSIX_API) - if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) - name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & - ~(OBJECTS_NAME_ALIGNMENT-1); - #endif - - information->name_length = name_length; + information->name_length = maximum_name_length; _Chain_Initialize_empty( &information->Inactive ); @@ -164,12 +158,12 @@ void _Objects_Initialize_information( if ( (supports_global == true) && _System_state_Is_multiprocessing ) { information->global_table = - (Chain_Control *) _Workspace_Allocate_or_fatal_error( - (_Objects_Maximum_nodes + 1) * sizeof(Chain_Control) - ); + (Chain_Control *) _Workspace_Allocate_or_fatal_error( + (_Objects_Maximum_nodes + 1) * sizeof(Chain_Control) + ); for ( index=1; index <= _Objects_Maximum_nodes ; index++ ) - _Chain_Initialize_empty( &information->global_table[ index ] ); + _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL;