[rtems commit] rtems: Move _Partition_Allocate_buffer()
Sebastian Huber
sebh at rtems.org
Mon Nov 23 09:45:31 UTC 2020
Module: rtems
Branch: master
Commit: 6d413ef1f834a4ae53372cec28aac3bfe8514179
Changeset: http://git.rtems.org/rtems/commit/?id=6d413ef1f834a4ae53372cec28aac3bfe8514179
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Wed Oct 14 10:12:56 2020 +0200
rtems: Move _Partition_Allocate_buffer()
It is only used by rtems_partition_get_buffer().
---
cpukit/include/rtems/rtems/partimpl.h | 14 --------------
cpukit/rtems/src/partgetbuffer.c | 6 ++++++
2 files changed, 6 insertions(+), 14 deletions(-)
diff --git a/cpukit/include/rtems/rtems/partimpl.h b/cpukit/include/rtems/rtems/partimpl.h
index 9327188..fe9974d 100644
--- a/cpukit/include/rtems/rtems/partimpl.h
+++ b/cpukit/include/rtems/rtems/partimpl.h
@@ -36,20 +36,6 @@ extern "C" {
*/
/**
- * @brief Allocate a buffer from the_partition.
- *
- * This function attempts to allocate a buffer from the_partition.
- * If successful, it returns the address of the allocated buffer.
- * Otherwise, it returns NULL.
- */
-RTEMS_INLINE_ROUTINE void *_Partition_Allocate_buffer (
- Partition_Control *the_partition
-)
-{
- return _Chain_Get_unprotected( &the_partition->Memory );
-}
-
-/**
* @brief Frees the_buffer to the_partition.
*
* This routine frees the_buffer to the_partition.
diff --git a/cpukit/rtems/src/partgetbuffer.c b/cpukit/rtems/src/partgetbuffer.c
index c92664e..2061ff1 100644
--- a/cpukit/rtems/src/partgetbuffer.c
+++ b/cpukit/rtems/src/partgetbuffer.c
@@ -21,6 +21,12 @@
#endif
#include <rtems/rtems/partimpl.h>
+#include <rtems/score/chainimpl.h>
+
+static void *_Partition_Allocate_buffer( Partition_Control *the_partition )
+{
+ return _Chain_Get_unprotected( &the_partition->Memory );
+}
rtems_status_code rtems_partition_get_buffer(
rtems_id id,
More information about the vc
mailing list