summaryrefslogtreecommitdiffstats
path: root/cpukit/score
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-04-19 13:39:00 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-04-21 07:29:39 +0200
commitf05eeb2091803b17f89045a685028e9e403f06eb (patch)
tree0773deca2b81089746cf1a4e7c8725ab0ab89ca8 /cpukit/score
parentscore: Introduce _Thread_queue_Flush_critical() (diff)
downloadrtems-f05eeb2091803b17f89045a685028e9e403f06eb.tar.bz2
score: Simplify _Objects_Initialize_information()
Remove unused supports_global parameter. Convert _Objects_Initialize_information() to a macro to avoid use of RTEMS_MULTIPROCESSING define for each caller.
Diffstat (limited to 'cpukit/score')
-rw-r--r--cpukit/score/include/rtems/score/objectimpl.h68
-rw-r--r--cpukit/score/include/rtems/score/threadimpl.h4
-rw-r--r--cpukit/score/src/apimutex.c6
-rw-r--r--cpukit/score/src/objectinitializeinformation.c3
-rw-r--r--cpukit/score/src/thread.c16
5 files changed, 60 insertions, 37 deletions
diff --git a/cpukit/score/include/rtems/score/objectimpl.h b/cpukit/score/include/rtems/score/objectimpl.h
index ee9da931ae..47d17dd37a 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 6b65e8ecbc..b19a6dcae0 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 1ac505220a..a098edbd61 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 3149bb1df0..dc8a106fa5 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 68a728c385..83e98cbab2 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
);
}