[PATCH 15/20] rtems: Move _Partition_Allocate()

Sebastian Huber sebastian.huber at embedded-brains.de
Fri Nov 20 11:15:21 UTC 2020


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 ab0bdc76f7..e2325bf8b5 100644
--- a/cpukit/include/rtems/rtems/partimpl.h
+++ b/cpukit/include/rtems/rtems/partimpl.h
@@ -33,18 +33,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.
  *
diff --git a/cpukit/rtems/src/partcreate.c b/cpukit/rtems/src/partcreate.c
index a6824d5224..7caac4f796 100644
--- a/cpukit/rtems/src/partcreate.c
+++ b/cpukit/rtems/src/partcreate.c
@@ -37,6 +37,11 @@ static bool _Partition_Is_buffer_area_aligned( const void *starting_address )
   return ( ( (uintptr_t) starting_address ) % CPU_SIZEOF_POINTER ) == 0;
 }
 
+static Partition_Control *_Partition_Allocate( void )
+{
+  return (Partition_Control *) _Objects_Allocate( &_Partition_Information );
+}
+
 static void _Partition_Initialize(
   Partition_Control *the_partition,
   void              *starting_address,
-- 
2.26.2



More information about the devel mailing list