[rtems commit] score: Remove unused _Workspace_Allocate_aligned()

Sebastian Huber sebh at rtems.org
Mon Feb 17 07:46:39 UTC 2020


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

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Thu Feb 13 11:34:34 2020 +0100

score: Remove unused _Workspace_Allocate_aligned()

---

 cpukit/include/rtems/score/wkspace.h | 11 -----------
 cpukit/score/src/wkspace.c           |  5 -----
 testsuites/sptests/spwkspace/init.c  | 14 --------------
 3 files changed, 30 deletions(-)

diff --git a/cpukit/include/rtems/score/wkspace.h b/cpukit/include/rtems/score/wkspace.h
index 8d0d3bc..92f29bb 100644
--- a/cpukit/include/rtems/score/wkspace.h
+++ b/cpukit/include/rtems/score/wkspace.h
@@ -75,17 +75,6 @@ void _Workspace_Handler_initialization(
 void *_Workspace_Allocate( size_t size );
 
 /**
- * @brief Allocates aligned memory from workspace.
- *
- * @param size The size of the requested memory.
- * @param alignment The alignment of the requested memory.
- *
- * @retval other The memory area begin.
- * @retval NULL Not enough resources.
- */
-void *_Workspace_Allocate_aligned( size_t size, size_t alignment );
-
-/**
  * @brief Frees memory to the workspace.
  *
  * This function frees the specified block of memory.
diff --git a/cpukit/score/src/wkspace.c b/cpukit/score/src/wkspace.c
index fbdb0b0..049b857 100644
--- a/cpukit/score/src/wkspace.c
+++ b/cpukit/score/src/wkspace.c
@@ -132,11 +132,6 @@ void *_Workspace_Allocate(
   return memory;
 }
 
-void *_Workspace_Allocate_aligned( size_t size, size_t alignment )
-{
-  return _Heap_Allocate_aligned( &_Workspace_Area, size, alignment );
-}
-
 /*
  *  _Workspace_Free
  */
diff --git a/testsuites/sptests/spwkspace/init.c b/testsuites/sptests/spwkspace/init.c
index ab07e00..d9f01b1 100644
--- a/testsuites/sptests/spwkspace/init.c
+++ b/testsuites/sptests/spwkspace/init.c
@@ -56,17 +56,6 @@ static void test_workspace_string_duplicate(void)
   _Workspace_Free( dup_e );
 }
 
-static void test_workspace_allocate_aligned(void)
-{
-  uintptr_t align = 512;
-  void *p = _Workspace_Allocate_aligned( 1, align );
-
-  rtems_test_assert( p != NULL );
-  rtems_test_assert( ((uintptr_t) p & (align - 1)) == 0 );
-
-  _Workspace_Free( p );
-}
-
 rtems_task Init(
   rtems_task_argument argument
 )
@@ -113,9 +102,6 @@ rtems_task Init(
   puts( "_Workspace_String_duplicate - samples" );
   test_workspace_string_duplicate();
 
-  puts( "_Workspace_Allocate_aligned" );
-  test_workspace_allocate_aligned();
-
   TEST_END();
   rtems_test_exit( 0 );
 }



More information about the vc mailing list