forked from Imagelibrary/rtems
2011-11-29 Joel Sherrill <joel.sherrilL@OARcorp.com>
PR 1967/cpukit * score/include/rtems/score/object.h, score/src/objectinitializeinformation.c: Remove OBJECTS_NAME_ALIGNMENT and uses.
This commit is contained in:
@@ -1,3 +1,10 @@
|
|||||||
|
2011-11-29 Joel Sherrill <joel.sherrilL@OARcorp.com>
|
||||||
|
|
||||||
|
PR 1967/cpukit
|
||||||
|
* score/include/rtems/score/object.h,
|
||||||
|
score/src/objectinitializeinformation.c: Remove
|
||||||
|
OBJECTS_NAME_ALIGNMENT and uses.
|
||||||
|
|
||||||
2011-11-28 Joel Sherrill <joel.sherrill@oarcorp.com>
|
2011-11-28 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||||
|
|
||||||
PR 1941/cpukit
|
PR 1941/cpukit
|
||||||
|
|||||||
@@ -64,13 +64,6 @@ typedef union {
|
|||||||
uint32_t name_u32;
|
uint32_t name_u32;
|
||||||
} Objects_Name;
|
} 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.
|
* Functions which compare names are prototyped like this.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -128,18 +128,12 @@ void _Objects_Initialize_information(
|
|||||||
/*
|
/*
|
||||||
* Calculate the maximum name length
|
* Calculate the maximum name length
|
||||||
*
|
*
|
||||||
* NOTE: Always 4 bytes long in Class so aligned. It is POSIX name
|
* NOTE: Either 4 bytes for Classic API names or an arbitrary
|
||||||
* lengths that may be an odd number of bytes.
|
* 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)
|
information->name_length = maximum_name_length;
|
||||||
if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) )
|
|
||||||
name_length = (name_length + OBJECTS_NAME_ALIGNMENT) &
|
|
||||||
~(OBJECTS_NAME_ALIGNMENT-1);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
information->name_length = name_length;
|
|
||||||
|
|
||||||
_Chain_Initialize_empty( &information->Inactive );
|
_Chain_Initialize_empty( &information->Inactive );
|
||||||
|
|
||||||
@@ -164,12 +158,12 @@ void _Objects_Initialize_information(
|
|||||||
if ( (supports_global == true) && _System_state_Is_multiprocessing ) {
|
if ( (supports_global == true) && _System_state_Is_multiprocessing ) {
|
||||||
|
|
||||||
information->global_table =
|
information->global_table =
|
||||||
(Chain_Control *) _Workspace_Allocate_or_fatal_error(
|
(Chain_Control *) _Workspace_Allocate_or_fatal_error(
|
||||||
(_Objects_Maximum_nodes + 1) * sizeof(Chain_Control)
|
(_Objects_Maximum_nodes + 1) * sizeof(Chain_Control)
|
||||||
);
|
);
|
||||||
|
|
||||||
for ( index=1; index <= _Objects_Maximum_nodes ; index++ )
|
for ( index=1; index <= _Objects_Maximum_nodes ; index++ )
|
||||||
_Chain_Initialize_empty( &information->global_table[ index ] );
|
_Chain_Initialize_empty( &information->global_table[ index ] );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
information->global_table = NULL;
|
information->global_table = NULL;
|
||||||
|
|||||||
Reference in New Issue
Block a user