summaryrefslogtreecommitdiffstats
path: root/cpukit/score
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2020-01-03 07:19:47 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2020-02-12 09:08:41 +0100
commitfc32904f4a270976961d61385be44c56fcc6fd01 (patch)
treed170993186878f2e3a38a007eadd068203556dcf /cpukit/score
parentscore: Add _Objects_Activate_unlimited() (diff)
downloadrtems-fc32904f4a270976961d61385be44c56fcc6fd01.tar.bz2
score: Add _Objects_Allocate_with_extend()
Update #3835.
Diffstat (limited to 'cpukit/score')
-rw-r--r--cpukit/score/src/objectallocateunlimited.c36
1 files changed, 10 insertions, 26 deletions
diff --git a/cpukit/score/src/objectallocateunlimited.c b/cpukit/score/src/objectallocateunlimited.c
index 6ec4a7950b..1fc6f07b2d 100644
--- a/cpukit/score/src/objectallocateunlimited.c
+++ b/cpukit/score/src/objectallocateunlimited.c
@@ -7,7 +7,7 @@
/*
* SPDX-License-Identifier: BSD-2-Clause
*
- * Copyright (C) 1989, 2007 On-Line Applications Research Corporation (OAR)
+ * Copyright (C) 2020 embedded brains GmbH
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -38,31 +38,15 @@
#include <rtems/score/objectdata.h>
#include <rtems/score/objectimpl.h>
-Objects_Control *_Objects_Allocate_unlimited( Objects_Information *information )
+static void _Objects_Do_extend_information( Objects_Information *information )
{
- Objects_Control *the_object;
-
- _Assert( _Objects_Is_auto_extend( information ) );
-
- /*
- * OK. The manager should be initialized and configured to have objects.
- * With any luck, it is safe to attempt to allocate an object.
- */
- the_object = _Objects_Get_inactive( information );
-
- /*
- * If the list is empty then we are out of objects and need to
- * extend information base.
- */
-
- if ( the_object == NULL ) {
- _Objects_Extend_information( information );
- the_object = _Objects_Get_inactive( information );
- }
-
- if ( the_object != NULL ) {
- _Objects_Activate_unlimited( information, the_object );
- }
+ _Objects_Extend_information( information );
+}
- return the_object;
+Objects_Control *_Objects_Allocate_unlimited( Objects_Information *information )
+{
+ return _Objects_Allocate_with_extend(
+ information,
+ _Objects_Do_extend_information
+ );
}