summaryrefslogtreecommitdiffstats
path: root/cpukit/score/include/rtems/score/objectimpl.h
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/include/rtems/score/objectimpl.h
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/include/rtems/score/objectimpl.h')
-rw-r--r--cpukit/score/include/rtems/score/objectimpl.h68
1 files changed, 56 insertions, 12 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