diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-04-07 16:48:30 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-04-12 07:36:18 +0200 |
commit | 572cb6242969f96a5bf74dc107e3f845894b6b2b (patch) | |
tree | be87de631165d9314f36ad6d48e15b8ca8fb9d7b /cpukit/score/src/objectgetnext.c | |
parent | rtems: Ensure lock ownership for _Region_Get() (diff) | |
download | rtems-572cb6242969f96a5bf74dc107e3f845894b6b2b.tar.bz2 |
score: Simplify _Objects_Get_no_protection()
This functions supports only local objects. Thus, drop the location
parameter which was unused by all callers.
Remove superfluous includes from Classic Region implementation.
Diffstat (limited to 'cpukit/score/src/objectgetnext.c')
-rw-r--r-- | cpukit/score/src/objectgetnext.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/cpukit/score/src/objectgetnext.c b/cpukit/score/src/objectgetnext.c index 544ded7000..c0ebbbed98 100644 --- a/cpukit/score/src/objectgetnext.c +++ b/cpukit/score/src/objectgetnext.c @@ -28,7 +28,7 @@ _Objects_Get_next( Objects_Id *next_id_p ) { - Objects_Control *object; + Objects_Control *the_object; Objects_Id next_id; if ( !information ) @@ -58,12 +58,13 @@ _Objects_Get_next( } /* try to grab one */ - object = _Objects_Get_no_protection(information, next_id, location_p); + the_object = _Objects_Get_no_protection( information, next_id ); next_id++; - } while (*location_p != OBJECTS_LOCAL); + } while ( the_object == NULL ); + *location_p = OBJECTS_LOCAL; *next_id_p = next_id; - return object; + return the_object; } |