[PATCH 1/2] score: Remove unused _Workspace_Allocate_aligned()
Sebastian Huber
sebastian.huber at embedded-brains.de
Thu Feb 13 10:43:36 UTC 2020
---
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 8d0d3bc114..92f29bb4b3 100644
--- a/cpukit/include/rtems/score/wkspace.h
+++ b/cpukit/include/rtems/score/wkspace.h
@@ -74,17 +74,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.
*
diff --git a/cpukit/score/src/wkspace.c b/cpukit/score/src/wkspace.c
index fbdb0b0ba9..049b857953 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 ab07e006c5..d9f01b1e48 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 );
}
--
2.16.4
More information about the devel
mailing list