Remove unused supports_global parameter. Convert _Objects_Initialize_information() to a macro to avoid use of RTEMS_MULTIPROCESSING define for each caller. --- cpukit/posix/src/cond.c | 6 +-- cpukit/posix/src/key.c | 6 +-- cpukit/posix/src/mqueue.c | 12 +---- cpukit/posix/src/mutex.c | 6 +-- cpukit/posix/src/pbarrier.c | 8 +-- cpukit/posix/src/prwlock.c | 8 +-- cpukit/posix/src/pspin.c | 6 +-- cpukit/posix/src/pthread.c | 4 -- cpukit/posix/src/ptimer.c | 6 +-- cpukit/posix/src/semaphore.c | 6 +-- cpukit/rtems/src/barrier.c | 6 +-- cpukit/rtems/src/dpmem.c | 6 +-- cpukit/rtems/src/msg.c | 6 +-- cpukit/rtems/src/part.c | 6 +-- cpukit/rtems/src/ratemon.c | 6 +-- cpukit/rtems/src/region.c | 6 +-- cpukit/rtems/src/rtemstimer.c | 6 +-- cpukit/rtems/src/sem.c | 6 +-- cpukit/rtems/src/tasks.c | 4 -- cpukit/sapi/src/extension.c | 6 +-- cpukit/score/include/rtems/score/objectimpl.h | 68 +++++++++++++++++++++----- cpukit/score/include/rtems/score/threadimpl.h | 4 -- cpukit/score/src/apimutex.c | 6 +-- cpukit/score/src/objectinitializeinformation.c | 3 +- cpukit/score/src/thread.c | 16 +----- testsuites/psxtests/psxobj01/init.c | 8 +-- 26 files changed, 83 insertions(+), 148 deletions(-)
diff --git a/cpukit/posix/src/cond.c b/cpukit/posix/src/cond.c index d0ce8a6..8ee57d8 100644 --- a/cpukit/posix/src/cond.c +++ b/cpukit/posix/src/cond.c @@ -53,12 +53,8 @@ static void _POSIX_Condition_variables_Manager_initialization(void) sizeof( POSIX_Condition_variables_Control ), /* size of this object's control block */ true, /* true if names for this object are strings */ - _POSIX_PATH_MAX /* maximum length of each object's name */ -#if defined(RTEMS_MULTIPROCESSING) - , - false, /* true if this is a global object class */ + _POSIX_PATH_MAX, /* maximum length of each object's name */ NULL /* Proxy extraction support callout */ -#endif ); } diff --git a/cpukit/posix/src/key.c b/cpukit/posix/src/key.c index 0bc88ae..6b2dc3d 100644 --- a/cpukit/posix/src/key.c +++ b/cpukit/posix/src/key.c @@ -141,12 +141,8 @@ static void _POSIX_Keys_Manager_initialization(void) sizeof( POSIX_Keys_Control ), /* size of this object's control block */ true, /* true if names for this object are strings */ - _POSIX_PATH_MAX /* maximum length of each object's name */ -#if defined(RTEMS_MULTIPROCESSING) - , - false, /* true if this is a global object class */ + _POSIX_PATH_MAX, /* maximum length of each object's name */ NULL /* Proxy extraction support callout */ -#endif ); _POSIX_Keys_Initialize_keypool(); diff --git a/cpukit/posix/src/mqueue.c b/cpukit/posix/src/mqueue.c index 0f261f6..e5fc3a0 100644 --- a/cpukit/posix/src/mqueue.c +++ b/cpukit/posix/src/mqueue.c @@ -58,12 +58,8 @@ static void _POSIX_Message_queue_Manager_initialization(void) sizeof( POSIX_Message_queue_Control ), /* size of this object's control block */ true, /* true if names for this object are strings */ - _POSIX_PATH_MAX /* maximum length of each object's name */ -#if defined(RTEMS_MULTIPROCESSING) - , - false, /* true if this is a global object class */ + _POSIX_PATH_MAX, /* maximum length of each object's name */ NULL /* Proxy extraction support callout */ -#endif ); _Objects_Initialize_information( &_POSIX_Message_queue_Information_fds, @@ -73,12 +69,8 @@ static void _POSIX_Message_queue_Manager_initialization(void) sizeof( POSIX_Message_queue_Control_fd ), /* size of this object's control block */ true, /* true if names for this object are strings */ - NAME_MAX /* maximum length of each object's name */ -#if defined(RTEMS_MULTIPROCESSING) - , - false, /* true if this is a global object class */ + NAME_MAX, /* maximum length of each object's name */ NULL /* Proxy extraction support callout */ -#endif ); } diff --git a/cpukit/posix/src/mutex.c b/cpukit/posix/src/mutex.c index ef56d0a..22b14c0 100644 --- a/cpukit/posix/src/mutex.c +++ b/cpukit/posix/src/mutex.c @@ -74,12 +74,8 @@ static void _POSIX_Mutex_Manager_initialization(void) sizeof( POSIX_Mutex_Control ), /* size of this object's control block */ true, /* true if names for this object are strings */ - _POSIX_PATH_MAX /* maximum length of each object's name */ -#if defined(RTEMS_MULTIPROCESSING) - , - false, /* true if this is a global object class */ + _POSIX_PATH_MAX, /* maximum length of each object's name */ NULL /* Proxy extraction support callout */ -#endif ); } diff --git a/cpukit/posix/src/pbarrier.c b/cpukit/posix/src/pbarrier.c index 1ae3115..8216a08 100644 --- a/cpukit/posix/src/pbarrier.c +++ b/cpukit/posix/src/pbarrier.c @@ -39,12 +39,8 @@ static void _POSIX_Barrier_Manager_initialization(void) /* maximum objects of this class */ sizeof( POSIX_Barrier_Control ),/* size of this object's control block */ true, /* true if the name is a string */ - _POSIX_PATH_MAX /* maximum length of each object's name */ -#if defined(RTEMS_MULTIPROCESSING) - , - false, /* true if this is a global object class */ - NULL /* Proxy extraction support callout */ -#endif + _POSIX_PATH_MAX, /* maximum length of each object's name */ + NULL /* Proxy extraction support callout */ ); } diff --git a/cpukit/posix/src/prwlock.c b/cpukit/posix/src/prwlock.c index 10c88d9..963ad1f 100644 --- a/cpukit/posix/src/prwlock.c +++ b/cpukit/posix/src/prwlock.c @@ -36,12 +36,8 @@ static void _POSIX_RWLock_Manager_initialization(void) /* maximum objects of this class */ sizeof( POSIX_RWLock_Control ), /* size of this object's control block */ true, /* true if the name is a string */ - _POSIX_PATH_MAX /* maximum length of each object's name */ -#if defined(RTEMS_MULTIPROCESSING) - , - false, /* true if this is a global object class */ - NULL /* Proxy extraction support callout */ -#endif + _POSIX_PATH_MAX, /* maximum length of each object's name */ + NULL /* Proxy extraction support callout */ ); } diff --git a/cpukit/posix/src/pspin.c b/cpukit/posix/src/pspin.c index 62e6f3a..6c466bc 100644 --- a/cpukit/posix/src/pspin.c +++ b/cpukit/posix/src/pspin.c @@ -39,12 +39,8 @@ static void _POSIX_Spinlock_Manager_initialization(void) /* maximum objects of this class */ sizeof( POSIX_Spinlock_Control ),/* size of this object's control block */ true, /* true if the name is a string */ - _POSIX_PATH_MAX /* maximum length of each object's name */ -#if defined(RTEMS_MULTIPROCESSING) - , - false, /* true if this is a global object class */ + _POSIX_PATH_MAX, /* maximum length of each object's name */ NULL /* Proxy extraction support callout */ -#endif ); } diff --git a/cpukit/posix/src/pthread.c b/cpukit/posix/src/pthread.c index cf4eab4..61e498b 100644 --- a/cpukit/posix/src/pthread.c +++ b/cpukit/posix/src/pthread.c @@ -352,10 +352,6 @@ static void _POSIX_Threads_Manager_initialization(void) /* maximum objects of this class */ true, /* true if names for this object are strings */ _POSIX_PATH_MAX /* maximum length of each object's name */ -#if defined(RTEMS_MULTIPROCESSING) - , - false /* true if this is a global object class */ -#endif ); /* diff --git a/cpukit/posix/src/ptimer.c b/cpukit/posix/src/ptimer.c index 810112a..de3645c 100644 --- a/cpukit/posix/src/ptimer.c +++ b/cpukit/posix/src/ptimer.c @@ -67,12 +67,8 @@ static void _POSIX_Timer_Manager_initialization(void) sizeof( POSIX_Timer_Control ), /* size of this object's control block */ true, /* true if names for this object are strings */ - _POSIX_PATH_MAX /* maximum length of each object's name */ -#if defined(RTEMS_MULTIPROCESSING) - , - false, /* true if this is a global object class */ + _POSIX_PATH_MAX, /* maximum length of each object's name */ NULL /* Proxy extraction support callout */ -#endif ); } diff --git a/cpukit/posix/src/semaphore.c b/cpukit/posix/src/semaphore.c index db3ae0c..661456c 100644 --- a/cpukit/posix/src/semaphore.c +++ b/cpukit/posix/src/semaphore.c @@ -55,12 +55,8 @@ static void _POSIX_Semaphore_Manager_initialization(void) sizeof( POSIX_Semaphore_Control ), /* size of this object's control block */ true, /* true if names for this object are strings */ - _POSIX_PATH_MAX /* maximum length of each object's name */ -#if defined(RTEMS_MULTIPROCESSING) - , - false, /* true if this is a global object class */ + _POSIX_PATH_MAX, /* maximum length of each object's name */ NULL /* Proxy extraction support callout */ -#endif ); } diff --git a/cpukit/rtems/src/barrier.c b/cpukit/rtems/src/barrier.c index 6c85f47..a291238 100644 --- a/cpukit/rtems/src/barrier.c +++ b/cpukit/rtems/src/barrier.c @@ -40,12 +40,8 @@ static void _Barrier_Manager_initialization(void) /* maximum objects of this class */ sizeof( Barrier_Control ), /* size of this object's control block */ false, /* true if the name is a string */ - RTEMS_MAXIMUM_NAME_LENGTH /* maximum length of an object name */ -#if defined(RTEMS_MULTIPROCESSING) - , - false, /* true if this is a global object class */ + RTEMS_MAXIMUM_NAME_LENGTH, /* maximum length of an object name */ NULL /* Proxy extraction support callout */ -#endif ); } diff --git a/cpukit/rtems/src/dpmem.c b/cpukit/rtems/src/dpmem.c index aca71a3..2522a59 100644 --- a/cpukit/rtems/src/dpmem.c +++ b/cpukit/rtems/src/dpmem.c @@ -38,12 +38,8 @@ static void _Dual_ported_memory_Manager_initialization(void) sizeof( Dual_ported_memory_Control ), /* size of this object's control block */ false, /* true if names of this object are strings */ - RTEMS_MAXIMUM_NAME_LENGTH /* maximum length of each object's name */ -#if defined(RTEMS_MULTIPROCESSING) - , - false, /* true if this is a global object class */ + RTEMS_MAXIMUM_NAME_LENGTH, /* maximum length of each object's name */ NULL /* Proxy extraction support callout */ -#endif ); } diff --git a/cpukit/rtems/src/msg.c b/cpukit/rtems/src/msg.c index acb6c37..44a0727 100644 --- a/cpukit/rtems/src/msg.c +++ b/cpukit/rtems/src/msg.c @@ -40,13 +40,9 @@ static void _Message_queue_Manager_initialization(void) sizeof( Message_queue_Control ), /* size of this object's control block */ false, /* true if names of this object are strings */ - RTEMS_MAXIMUM_NAME_LENGTH /* maximum length of each object's name */ -#if defined(RTEMS_MULTIPROCESSING) - , - true, /* true if this is a global object class */ + RTEMS_MAXIMUM_NAME_LENGTH, /* maximum length of each object's name */ _Message_queue_MP_Send_extract_proxy /* Proxy extraction support callout */ -#endif ); /* diff --git a/cpukit/rtems/src/part.c b/cpukit/rtems/src/part.c index 211c117..4df676e 100644 --- a/cpukit/rtems/src/part.c +++ b/cpukit/rtems/src/part.c @@ -37,12 +37,8 @@ static void _Partition_Manager_initialization(void) /* maximum objects of this class */ sizeof( Partition_Control ), /* size of this object's control block */ false, /* true if the name is a string */ - RTEMS_MAXIMUM_NAME_LENGTH /* maximum length of an object name */ -#if defined(RTEMS_MULTIPROCESSING) - , - true, /* true if this is a global object class */ + RTEMS_MAXIMUM_NAME_LENGTH, /* maximum length of an object name */ _Partition_MP_Send_extract_proxy /* Proxy extraction support callout */ -#endif ); /* diff --git a/cpukit/rtems/src/ratemon.c b/cpukit/rtems/src/ratemon.c index b0d248f..dd3ca29 100644 --- a/cpukit/rtems/src/ratemon.c +++ b/cpukit/rtems/src/ratemon.c @@ -37,12 +37,8 @@ static void _Rate_monotonic_Manager_initialization(void) /* maximum objects of this class */ sizeof( Rate_monotonic_Control ),/* size of this object's control block */ false, /* true if the name is a string */ - RTEMS_MAXIMUM_NAME_LENGTH /* maximum length of an object name */ -#if defined(RTEMS_MULTIPROCESSING) - , - false, /* true if this is a global object class */ + RTEMS_MAXIMUM_NAME_LENGTH, /* maximum length of an object name */ NULL /* Proxy extraction support callout */ -#endif ); } diff --git a/cpukit/rtems/src/region.c b/cpukit/rtems/src/region.c index f1c2b23..65933f9 100644 --- a/cpukit/rtems/src/region.c +++ b/cpukit/rtems/src/region.c @@ -48,12 +48,8 @@ static void _Region_Manager_initialization(void) /* maximum objects of this class */ sizeof( Region_Control ), /* size of this object's control block */ false, /* true if the name is a string */ - RTEMS_MAXIMUM_NAME_LENGTH /* maximum length of an object name */ -#if defined(RTEMS_MULTIPROCESSING) - , - false, /* true if this is a global object class */ + RTEMS_MAXIMUM_NAME_LENGTH, /* maximum length of an object name */ NULL /* Proxy extraction support callout */ -#endif ); /* diff --git a/cpukit/rtems/src/rtemstimer.c b/cpukit/rtems/src/rtemstimer.c index f591c25..d60e4a9 100644 --- a/cpukit/rtems/src/rtemstimer.c +++ b/cpukit/rtems/src/rtemstimer.c @@ -39,12 +39,8 @@ static void _Timer_Manager_initialization(void) /* maximum objects of this class */ sizeof( Timer_Control ), /* size of this object's control block */ false, /* true if the name is a string */ - RTEMS_MAXIMUM_NAME_LENGTH /* maximum length of an object name */ -#if defined(RTEMS_MULTIPROCESSING) - , - false, /* true if this is a global object class */ + RTEMS_MAXIMUM_NAME_LENGTH, /* maximum length of an object name */ NULL /* Proxy extraction support callout */ -#endif ); } diff --git a/cpukit/rtems/src/sem.c b/cpukit/rtems/src/sem.c index 13615eb..a221852 100644 --- a/cpukit/rtems/src/sem.c +++ b/cpukit/rtems/src/sem.c @@ -39,12 +39,8 @@ static void _Semaphore_Manager_initialization(void) /* maximum objects of this class */ sizeof( Semaphore_Control ), /* size of this object's control block */ false, /* true if the name is a string */ - RTEMS_MAXIMUM_NAME_LENGTH /* maximum length of an object name */ -#if defined(RTEMS_MULTIPROCESSING) - , - true, /* true if this is a global object class */ + RTEMS_MAXIMUM_NAME_LENGTH, /* maximum length of an object name */ _Semaphore_MP_Send_extract_proxy /* Proxy extraction support callout */ -#endif ); /* diff --git a/cpukit/rtems/src/tasks.c b/cpukit/rtems/src/tasks.c index 832228e..f18e0ab 100644 --- a/cpukit/rtems/src/tasks.c +++ b/cpukit/rtems/src/tasks.c @@ -185,10 +185,6 @@ static void _RTEMS_tasks_Manager_initialization(void) /* maximum objects of this class */ false, /* true if the name is a string */ RTEMS_MAXIMUM_NAME_LENGTH /* maximum length of an object name */ -#if defined(RTEMS_MULTIPROCESSING) - , - true /* true if this is a global object class */ -#endif ); /* diff --git a/cpukit/sapi/src/extension.c b/cpukit/sapi/src/extension.c index 3378850..9c49683 100644 --- a/cpukit/sapi/src/extension.c +++ b/cpukit/sapi/src/extension.c @@ -36,12 +36,8 @@ static void _Extension_Manager_initialization(void) rtems_configuration_get_maximum_extensions(), sizeof( Extension_Control ), false, /* true if the name is a string */ - RTEMS_MAXIMUM_NAME_LENGTH /* maximum length of an object name */ -#if defined(RTEMS_MULTIPROCESSING) - , - false, /* true if this is a global object class */ + RTEMS_MAXIMUM_NAME_LENGTH, /* maximum length of an object name */ NULL /* Proxy extraction support callout */ -#endif ); } diff --git a/cpukit/score/include/rtems/score/objectimpl.h b/cpukit/score/include/rtems/score/objectimpl.h index ee9da93..47d17dd 100644 --- a/cpukit/score/include/rtems/score/objectimpl.h +++ b/cpukit/score/include/rtems/score/objectimpl.h @@ -122,6 +122,7 @@ typedef enum { OBJECTS_ERROR = 1 /* id was invalid */ } Objects_Locations; +#if defined(RTEMS_MULTIPROCESSING) /** * The following type defines the callout used when a local task * is extracted from a remote thread queue (i.e. it's proxy must @@ -131,6 +132,7 @@ typedef void ( *Objects_Thread_queue_Extract_callout )( Thread_Control *, Objects_Id ); +#endif /** * The following defines the structure for the information used to @@ -238,6 +240,20 @@ void _Objects_Shrink_information( Objects_Information *information ); +void _Objects_Do_initialize_information( + Objects_Information *information, + Objects_APIs the_api, + uint16_t the_class, + uint32_t maximum, + uint16_t size, + bool is_string, + uint32_t maximum_name_length +#if defined(RTEMS_MULTIPROCESSING) + , + Objects_Thread_queue_Extract_callout extract +#endif +); + /** * @brief Initialize object Information * @@ -259,20 +275,48 @@ void _Objects_Shrink_information( * @param[in] is_string is true if this object uses string style names. * @param[in] maximum_name_length is the maximum length of object names. */ -void _Objects_Initialize_information ( - Objects_Information *information, - Objects_APIs the_api, - uint16_t the_class, - uint32_t maximum, - uint16_t size, - bool is_string, - uint32_t maximum_name_length #if defined(RTEMS_MULTIPROCESSING) - , - bool supports_global, - Objects_Thread_queue_Extract_callout extract + #define _Objects_Initialize_information( \ + information, \ + the_api, \ + the_class, \ + maximum, \ + size, \ + is_string, \ + maximum_name_length, \ + extract \ + ) \ + _Objects_Do_initialize_information( \ + information, \ + the_api, \ + the_class, \ + maximum, \ + size, \ + is_string, \ + maximum_name_length, \ + extract \ + ) +#else + #define _Objects_Initialize_information( \ + information, \ + the_api, \ + the_class, \ + maximum, \ + size, \ + is_string, \ + maximum_name_length, \ + extract \ + ) \ + _Objects_Do_initialize_information( \ + information, \ + the_api, \ + the_class, \ + maximum, \ + size, \ + is_string, \ + maximum_name_length \ + ) #endif -); /** * @brief Object API Maximum Class diff --git a/cpukit/score/include/rtems/score/threadimpl.h b/cpukit/score/include/rtems/score/threadimpl.h index 6b65e8e..b19a6dc 100644 --- a/cpukit/score/include/rtems/score/threadimpl.h +++ b/cpukit/score/include/rtems/score/threadimpl.h @@ -94,10 +94,6 @@ void _Thread_Initialize_information( uint32_t maximum, bool is_string, uint32_t maximum_name_length -#if defined(RTEMS_MULTIPROCESSING) - , - bool supports_global -#endif ); /** diff --git a/cpukit/score/src/apimutex.c b/cpukit/score/src/apimutex.c index 1ac5052..a098edb 100644 --- a/cpukit/score/src/apimutex.c +++ b/cpukit/score/src/apimutex.c @@ -36,12 +36,8 @@ void _API_Mutex_Initialization( maximum_mutexes, /* maximum objects of this class */ sizeof( API_Mutex_Control ), /* size of this object's control block */ false, /* true if the name is a string */ - 0 /* maximum length of an object name */ -#if defined(RTEMS_MULTIPROCESSING) - , - false, /* true if this is a global object class */ + 0, /* maximum length of an object name */ NULL /* Proxy extraction support callout */ -#endif ); } diff --git a/cpukit/score/src/objectinitializeinformation.c b/cpukit/score/src/objectinitializeinformation.c index 3149bb1..dc8a106 100644 --- a/cpukit/score/src/objectinitializeinformation.c +++ b/cpukit/score/src/objectinitializeinformation.c @@ -24,7 +24,7 @@ #include <rtems/score/sysstate.h> #include <rtems/score/wkspace.h> -void _Objects_Initialize_information( +void _Objects_Do_initialize_information( Objects_Information *information, Objects_APIs the_api, uint16_t the_class, @@ -34,7 +34,6 @@ void _Objects_Initialize_information( uint32_t maximum_name_length #if defined(RTEMS_MULTIPROCESSING) , - bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) diff --git a/cpukit/score/src/thread.c b/cpukit/score/src/thread.c index 68a728c..83e98cb 100644 --- a/cpukit/score/src/thread.c +++ b/cpukit/score/src/thread.c @@ -51,10 +51,6 @@ void _Thread_Initialize_information( uint32_t maximum, bool is_string, uint32_t maximum_name_length -#if defined(RTEMS_MULTIPROCESSING) - , - bool supports_global -#endif ) { _Objects_Initialize_information( @@ -64,12 +60,8 @@ void _Thread_Initialize_information( maximum, _Thread_Control_size, is_string, - maximum_name_length - #if defined(RTEMS_MULTIPROCESSING) - , - supports_global, - NULL - #endif + maximum_name_length, + NULL ); _Freechain_Initialize( @@ -116,10 +108,6 @@ void _Thread_Handler_initialization(void) _Thread_Get_maximum_internal_threads(), false, /* true if names for this object are strings */ 8 /* maximum length of each object's name */ - #if defined(RTEMS_MULTIPROCESSING) - , - false /* true if this is a global object class */ - #endif ); } diff --git a/testsuites/psxtests/psxobj01/init.c b/testsuites/psxtests/psxobj01/init.c index 5f87308..c3b3f49 100644 --- a/testsuites/psxtests/psxobj01/init.c +++ b/testsuites/psxtests/psxobj01/init.c @@ -46,12 +46,8 @@ rtems_task Init( 0, /* maximum */ 4, /* size */ true, /* is_string */ - 10 /* maximum_name_length */ - #if defined(RTEMS_MULTIPROCESSING) - , - false, /* supports_global */ - NULL /* Objects_Thread_queue_Extract_callout extract */ - #endif + 10, /* maximum_name_length */ + NULL /* Objects_Thread_queue_Extract_callout extract */ ); -- 1.8.4.5 _______________________________________________ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel