summaryrefslogtreecommitdiffstats
path: root/cpukit/score
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-04-19 14:14:10 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-04-21 07:29:40 +0200
commitd7a12be9c3f1034947210d4bafa3d39fe1e74571 (patch)
treeb6371a8816cb82265149fb5aa861e49ebf1598b9 /cpukit/score
parentscore: Simplify _Objects_Get_next() (diff)
downloadrtems-d7a12be9c3f1034947210d4bafa3d39fe1e74571.tar.bz2
score: Optimize _Objects_Get_no_protection()
Make the id the first parameter since usual callers get the object identifier as the first parameter themself.
Diffstat (limited to 'cpukit/score')
-rw-r--r--cpukit/score/include/rtems/score/objectimpl.h8
-rw-r--r--cpukit/score/src/objectgetnext.c2
-rw-r--r--cpukit/score/src/objectgetnoprotection.c4
3 files changed, 8 insertions, 6 deletions
diff --git a/cpukit/score/include/rtems/score/objectimpl.h b/cpukit/score/include/rtems/score/objectimpl.h
index 6877b8e9fe..fb45977c1d 100644
--- a/cpukit/score/include/rtems/score/objectimpl.h
+++ b/cpukit/score/include/rtems/score/objectimpl.h
@@ -656,8 +656,10 @@ Objects_Control *_Objects_Get_local(
* is undefined. Otherwise, location is set to OBJECTS_ERROR
* and the_object is undefined.
*
- * @param[in] information points to an object class information block.
* @param[in] id is the Id of the object whose name we are locating.
+ * This is the first parameter since usual callers get the object identifier
+ * as the first parameter themself.
+ * @param[in] information points to an object class information block.
*
* @retval This method returns one of the values from the
* @ref Objects_Name_or_id_lookup_errors enumeration to indicate
@@ -670,8 +672,8 @@ Objects_Control *_Objects_Get_local(
* objects.
*/
Objects_Control *_Objects_Get_no_protection(
- const Objects_Information *information,
- Objects_Id id
+ Objects_Id id,
+ const Objects_Information *information
);
/**
diff --git a/cpukit/score/src/objectgetnext.c b/cpukit/score/src/objectgetnext.c
index 2d4f252b97..a46c02f2c2 100644
--- a/cpukit/score/src/objectgetnext.c
+++ b/cpukit/score/src/objectgetnext.c
@@ -52,7 +52,7 @@ Objects_Control *_Objects_Get_next(
}
/* try to grab one */
- the_object = _Objects_Get_no_protection( information, next_id );
+ the_object = _Objects_Get_no_protection( next_id, information );
next_id++;
diff --git a/cpukit/score/src/objectgetnoprotection.c b/cpukit/score/src/objectgetnoprotection.c
index eaa172c83b..85692234fa 100644
--- a/cpukit/score/src/objectgetnoprotection.c
+++ b/cpukit/score/src/objectgetnoprotection.c
@@ -21,8 +21,8 @@
#include <rtems/score/objectimpl.h>
Objects_Control *_Objects_Get_no_protection(
- const Objects_Information *information,
- Objects_Id id
+ Objects_Id id,
+ const Objects_Information *information
)
{
Objects_Control *the_object;