[rtems commit] rtems: Move _Partition_Allocate()

Sebastian Huber sebh at rtems.org
Tue Nov 24 06:40:41 UTC 2020


Module:    rtems
Branch:    master
Commit:    3c093d6752fb8e51216d734b60db1e97ecdb3fe4
Changeset: http://git.rtems.org/rtems/commit/?id=3c093d6752fb8e51216d734b60db1e97ecdb3fe4

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Wed Oct 14 10:32:18 2020 +0200

rtems: Move _Partition_Allocate()

It is only used by rtems_partition_create().

---

 cpukit/include/rtems/rtems/partimpl.h | 12 ------------
 cpukit/rtems/src/partcreate.c         |  5 +++++
 2 files changed, 5 insertions(+), 12 deletions(-)

diff --git a/cpukit/include/rtems/rtems/partimpl.h b/cpukit/include/rtems/rtems/partimpl.h
index ab0bdc7..e2325bf 100644
--- a/cpukit/include/rtems/rtems/partimpl.h
+++ b/cpukit/include/rtems/rtems/partimpl.h
@@ -34,18 +34,6 @@ extern "C" {
  */
 
 /**
- *  @brief Allocates a partition control block from the
- *  inactive chain of free partition control blocks.
- *
- *  This function allocates a partition control block from
- *  the inactive chain of free partition control blocks.
- */
-RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Allocate ( void )
-{
-  return (Partition_Control *) _Objects_Allocate( &_Partition_Information );
-}
-
-/**
  * @brief Calls _Objects_Get() using the ::_Partition_Information.
  *
  * @param id is the object identifier.
diff --git a/cpukit/rtems/src/partcreate.c b/cpukit/rtems/src/partcreate.c
index 1ac08d6..7eea6b3 100644
--- a/cpukit/rtems/src/partcreate.c
+++ b/cpukit/rtems/src/partcreate.c
@@ -27,6 +27,11 @@
 #include <rtems/score/sysstate.h>
 #include <rtems/sysinit.h>
 
+static Partition_Control *_Partition_Allocate( void )
+{
+  return (Partition_Control *) _Objects_Allocate( &_Partition_Information );
+}
+
 static void _Partition_Initialize(
   Partition_Control *the_partition,
   void              *starting_address,



More information about the vc mailing list