diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-01-28 11:32:35 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-02-04 10:06:34 +0100 |
commit | a850d040ab99b4d6c66a40adc86778c849f74ebe (patch) | |
tree | 911a3cb3c7f880242305c83078e4e45db6fcd66e /testsuites/sptests/spwkspace/init.c | |
parent | bsp/v850: Use proper ABI in linkcmds (diff) | |
download | rtems-a850d040ab99b4d6c66a40adc86778c849f74ebe.tar.bz2 |
score: Add _Workspace_Allocate_aligned()
Diffstat (limited to 'testsuites/sptests/spwkspace/init.c')
-rw-r--r-- | testsuites/sptests/spwkspace/init.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/testsuites/sptests/spwkspace/init.c b/testsuites/sptests/spwkspace/init.c index 1441662bf6..f6102e2159 100644 --- a/testsuites/sptests/spwkspace/init.c +++ b/testsuites/sptests/spwkspace/init.c @@ -54,6 +54,17 @@ 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 ) @@ -100,6 +111,9 @@ rtems_task Init( puts( "_Workspace_String_duplicate - samples" ); test_workspace_string_duplicate(); + puts( "_Workspace_Allocate_aligned" ); + test_workspace_allocate_aligned(); + puts( "*** END OF TEST WORKSPACE CLASSIC API ***" ); rtems_test_exit( 0 ); } |